A handler action is a function that accepts a formated message and handler
configuration.
Messages passed are filtered already regarding loglevel.
… parameters are used by logging system to interact with the action. … can
contain dry key to inform action that it meant to initialize itself. In the case
action should return TRUE if initialization succeded.
If it's not a dry run … contain the whole preformated logging.record.
A logging.record is a named list and has following structure:
- msg
contains the real formatted message
- level
message level as numeric
- levelname
message level name
- logger
name of the logger that generated it
- timestamp
formatted message timestamp
writeToConsole
detects if crayon package is available and uses it
to color messages. The coloring can be switched off by means of configuring
the handler with color_output option set to FALSE.
writeToFile
action expects file path to write to under
file key in handler options.