8#include "ll/api/base/Macro.h"
9#include "ll/api/base/StdInt.h"
10#include "ll/api/data/TmWithMs.h"
15enum class RotateInterval :
int {
46 RotateInterval
interval = RotateInterval::Daily;
75 RotatePolicy() =
default;
static LLNDAPI RotatePolicy disabled()
A policy that never rotates.
std::function< std::string(ArchiveNameInfo const &)> namer
Definition RotatePolicy.h:86
static LLNDAPI std::string defaultNamer(ArchiveNameInfo const &info)
Definition RotatePolicy.h:24
size_t index
Rotations already made within the current interval.
Definition RotatePolicy.h:26
RotateInterval interval
The policy's interval, which decides the timestamp's precision.
Definition RotatePolicy.h:27
data::TmWithMs time
The time the rotation was triggered at.
Definition RotatePolicy.h:25
Definition RotatePolicy.h:33
size_t maxFiles
Keeps at most this many archives, counting compressed and plain alike. 0 disables the limit.
Definition RotatePolicy.h:59
bool rotateOnOpen
Definition RotatePolicy.h:36
size_t keepUncompressed
Definition RotatePolicy.h:53
uint64 maxFileSize
Definition RotatePolicy.h:42
bool compress
Compresses archives to gzip on a background thread. The active file is never compressed.
Definition RotatePolicy.h:49
bool cleanup
Deletes archives that fall outside the limits below. When false, nothing is ever removed.
Definition RotatePolicy.h:56
RotateInterval interval
Definition RotatePolicy.h:46
uint64 totalSizeCap
Definition RotatePolicy.h:67
int maxAgeDays
Removes archives last modified more than this many days ago. 0 disables the limit.
Definition RotatePolicy.h:62