Log to a rotating file
Log to a rotating file
lgr::Filterable -> lgr::Appender -> lgr::AppenderFile -> AppenderFileRotating
backupsA data.frame containing information on path, file size,
etc... on the available backups of file.
new()AppenderFileRotating$new(
file,
threshold = NA_integer_,
layout = LayoutFormat$new(),
filters = NULL,
size = Inf,
max_backups = Inf,
compression = FALSE,
backup_dir = dirname(file),
create_file = NULL
)size, max_backups, compression, backup_dir, fmtsee rotor::rotate() for the meaning of these arguments. Note that
fmt corresponds to format and backup_dir to dir.
append()AppenderFileRotating$append(event)
rotate()AppenderFileRotating$rotate(force = FALSE)
prune()AppenderFileRotating$prune(max_backups = self$max_backups)
set_file()AppenderFileRotating$set_file(file)
set_size()AppenderFileRotating$set_size(x)
set_max_backups()AppenderFileRotating$set_max_backups(x)
set_compression()AppenderFileRotating$set_compression(x)
set_create_file()AppenderFileRotating$set_create_file(x)
set_backup_dir()AppenderFileRotating$set_backup_dir(x)
format()AppenderFileRotating$format(color = false, ...)
clone()The objects of this class are cloneable with this method.
AppenderFileRotating$clone(deep = FALSE)deepWhether to make a deep clone.
An extension of AppenderFile that rotates logfiles based on certain
conditions. Please refer to the documentation of rotor::rotate() for
the meanings of the extra arguments
AppenderFileRotatingDate, AppenderFileRotatingTime, rotor::rotate()
Other Appenders:
AppenderBuffer,
AppenderConsole,
AppenderFileRotatingDate,
AppenderFileRotatingTime,
AppenderFile,
AppenderTable,
Appender