Logger

Creates and dispatches LogEvents

Logger Loggers

Loggers

LoggerGlue

LoggerGlue

print(<Logger>) format(<Logger>) print(<ancestry>) format(<ancestry>)

Print a Logger Object

logger_tree()

Logger Tree

print(<logger_tree>) format(<logger_tree>)

Print Logger Trees

logger_index()

Return a data.frame of all registered loggers

get_log_levels() add_log_levels() remove_log_levels()

Manage Log Levels

log_exception() threshold() console_threshold() add_appender() remove_appender() show_log() show_dt() show_data()

Simple Logging

basic_config()

Basic Setup for the Logging System

get_logger() get_logger_glue()

Get/Create a Logger

logger_config() as_logger_config()

Logger Configuration Objects

default_exception_handler()

Demote an exception to a warning

Appenders

Output LogEvents to a destination

AppenderConsole

Log to the console

AppenderFile AppenderJson

Log to a file

AppenderFileRotating

Log to a rotating file

AppenderFileRotatingDate

Log to a date-stamped rotating file

AppenderFileRotatingTime

Log to a time-stamped rotating file

AppenderBuffer

Log to a memory buffer

print(<Appender>)

Print an Appender object

Layouts

Format LogEvents before output

LayoutFormat

Format Log Events as Text

LayoutGlue

Format Log Events as Text via glue

LayoutJson

Format LogEvents as JSON

LogEvent

Contains the Data that is beeing logged

LogEvent LogEvents

LogEvents - The atomic unit of logging

as_LogEvent()

Coerce objects to LogEvent

as.data.frame(<LogEvent>) as.data.table.LogEvent() as_tibble.LogEvent()

Coerce LogEvents to Data Frames

event_list() as_event_list() as.data.table.event_list() as.data.frame(<event_list>)

A List of LogEvents

print(<LogEvent>) format(<LogEvent>)

Print or Format Logging Data

toString(<LogEvent>)

Convert a LogEvent to a character string

Filters

Filter events passed to Appenders or Loggers

.obj()

Event Filters

FilterForceLevel

Override the log level of all events processed by a Logger/Appender

FilterInject

Inject values into all events processed by a Logger/Appender

is_filter()

Check if an R Object is a Filter

Utilities

General utility functions. Some may only be relevant to developers that want to extend lgr.

suspend_logging() unsuspend_logging() without_logging() with_logging()

Suspend All Logging

standardize_threshold() is_threshold() standardize_log_level() is_log_level() standardize_log_levels() is_log_levels()

Standardize User-Input Log Levels to Their Integer Representation

string_repr string_repr.function string_repr.data.frame string_repr.matrix string_repr.default

Short string representation for R objects

with_log_level() with_log_value()

Inject Values into Logging Calls

get_caller() get_user()

Information About the System

read_json_lines()

Read a JSON logfile

use_logger()

Setup a Simple Logger for a Package

label_levels() unlabel_levels()

Label/Unlabel Log Levels

colorize_levels()

Colorize Levels

pad_right pad_left

Pad Character Vectors

Abstract Classes

For Package developers that want to build new Appenders, Layouts or Loggers

Appender Appenders

Appenders

Layout Layouts

Abstract Class for Layouts

Filterable

Abstract Class for Filterables

AppenderTable

Abstract class for logging to tabular structures

AppenderMemory

Abstract class for logging to memory buffers

CannotInitializeAbstractClassError()

Logger Error Conditions