| AppenderFileRotatingTime {lgr} | R Documentation |
Log to a time-stamped rotating file
Description
Log to a time-stamped rotating file
Log to a time-stamped rotating file
Super classes
lgr::Filterable -> lgr::Appender -> lgr::AppenderFile -> lgr::AppenderFileRotating -> AppenderFileRotating
Active bindings
cache_backupsTRUEorFALSE. IfTRUE(the default) the list of backups is cached, ifFALSEit is read from disk every time this appender triggers. Caching brings a significant speedup for checking whether to rotate or not based on theageof the last backup, but is only safe if there are no other programs/functions (except this appender) interacting with the backups.
Methods
Public methods
Inherited methods
lgr::Filterable$add_filter()lgr::Filterable$filter()lgr::Filterable$remove_filter()lgr::Filterable$set_filters()lgr::Appender$set_layout()lgr::Appender$set_threshold()lgr::AppenderFile$show()lgr::AppenderFileRotating$append()lgr::AppenderFileRotating$prune()lgr::AppenderFileRotating$set_backup_dir()lgr::AppenderFileRotating$set_compression()lgr::AppenderFileRotating$set_create_file()lgr::AppenderFileRotating$set_file()lgr::AppenderFileRotating$set_max_backups()lgr::AppenderFileRotating$set_size()
Method new()
Usage
AppenderFileRotatingTime$new( file, threshold = NA_integer_, layout = LayoutFormat$new(), filters = NULL, age = Inf, size = -1, max_backups = Inf, compression = FALSE, backup_dir = dirname(file), fmt = "%Y-%m-%d--%H-%M-%S", overwrite = FALSE, cache_backups = TRUE, create_file = NULL )
Arguments
size, age, max_backups, compression, backup_dir, fmt, overwrite, cache_backupssee
rotor::rotate_time()for the meaning of these arguments. Note thatfmtcorresponds toformatandbackup_dirtodir.
Method rotate()
Usage
AppenderFileRotatingTime$rotate(force = FALSE, now = Sys.time())
Method set_age()
Usage
AppenderFileRotatingTime$set_age(x)
Method set_fmt()
Usage
AppenderFileRotatingTime$set_fmt(x)
Method set_overwrite()
Usage
AppenderFileRotatingTime$set_overwrite(x)
Method set_cache_backups()
set the cache_backups flag.
Usage
AppenderFileRotatingTime$set_cache_backups(x)
Arguments
xa
logicalscalar
Method format()
Usage
AppenderFileRotatingTime$format(color = FALSE, ...)
Method clone()
The objects of this class are cloneable with this method.
Usage
AppenderFileRotatingTime$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
See Also
AppenderFileRotatingDate, AppenderFileRotating, rotor::rotate()
Other Appenders:
AppenderBuffer,
AppenderConsole,
AppenderFileRotatingDate,
AppenderFileRotating,
AppenderFile,
AppenderTable,
Appender