Fix some timezone related tests for CRAN
create_file argument of
AppenderFileRotating*. This is now hardcoded to
FALSE doesn’t really make sense here).
default_exception_handler() now throws more informative warnings if an error is encountered during logging.
Moved more complex Appenders to package lgrExtra. This includes database Appenders, email and push notifications and AppenderDt (in-memory
AppenderFile$show() can now filter log files formatted by LayoutFormat by log level. Be aware that this just
greps through the file and therefore will return false positives on lines where the log message contains strings that can be interpreted as log levels.
AppenderFile$data now dispatches to
Layout$parse(). This makes it possible to tie reading/parsing of log files to Layouts.
Loggers gain a
list_log() method. See https://github.com/s-fleck/joblog for an R package that leverages this feature to create custom log event types for tracking the status of cron jobs.
AppenderBuffer now defaults to
flush_threshold = NULL (never flush because of the log level of an event)
basic_config() now works as documented for .jsonl files
AppenderMemory gains a
$clear() method that clears the buffer without sending the events to it’s attached appenders
LayoutJson gains a
timestamp_fmt field that can be used for custom timestamp formats (#34)
toString.LogEvent() for compact representations of LogEvents
lgr is now automatically tested for all major R version >= 3.2.0
flush_threshold is now independent of
default_should_flush() is no longer necessary and has been removed.
Updated AppenderFileRotating and co for compatibility with rotor 0.3.0
Most errors now have appropriate subclasses
Logger$log() dispatches to all appenders - even if some throw an error - instead of aborting after the first Appender that throws an error
complete rewrite of the documentation to use the new roxygen2 features for R6 classes.
logger_tree() which provides an overview of all registered loggers
dt active fields (which return the log as a data.frame or data.table)
Removed deprecated functions
lgr$error(), … instead.
$show() now handle custom fields containing atomic vectors correctly
Added support for rotating log files via
AppenderFileRotatingTime. Requires the package rotor.
AppenderFile$new() now creates an empty file, or fails if it can’t
Improved support for RMariaDB and dropped support for RMySQL
Improved support for RPostgres and dropped support for RPostgreSQL
reset argument to
get_logger(). This completely resets the configuration of the logger and also replaces special loggers (such as
LoggerGlue) with vanilla ones.
basic_config() now accepts thresholds (“info”, “fatal”) as arguments to
The default config of the root logger has changed. It now only has a console appender and a default threshold of
"info". To get back the old behaviour run
basic_config(threshold = "all", console = "info", memory = "all").
$config(NULL) now resets a Logger to its default/unconfigured state
$config() now accepts YAML as well as JSON files (or YAML/JSON as a character string)
get_logger_glue() now works as intended
lgr$error(), … instead.
Emergency fix that ensures test suite cleans up temporary files
Removed .rd file for the unexported LoggerRoot class
get_loggers() registers new loggers in the lgr::loggers namespace, this is a more global and decoupled approach similar to how python logging handles loggers.
full_name active binding for loggers. Loggers now only have qualified names and
name is now identical to what
full_name was before. For consistency the format method of
ancestry has also been revised.
Logger inheritance is now derived from the qualified name of a logger. Consequently
lg$parent is now derived from
lg$set_parent() is no longer possible.
If no threshold is set for a new Logger, it now inherits the threshold of its parent
Depend on R6 >= 2.4.0 which includes relevant fixes to finalizers. finalize methods are now private.
Logger now have a
config method that allows configuring Loggers with config objects and YAML files (experimental)