W4MLogger {W4MRUtils} | R Documentation |
The W4MLogger Class
Description
This is a simple logger used to make uniform outputs across W4M tools.
See get_logger for example usages.
Arguments
name |
character vector of length 1 - The name of the logger. Use different loggers with a name specific to each part of you program. The name will appear in the log prefix and helps to determine which part of the program did what |
format |
character vector of length 1 - The format string for each
log line. The default is :
|
do_coloring |
logical vector of length 1 - By default, the logger
uses special control character to give some coloring to the text,
depending on the log level (info, warning, error, debug or verbose).
This coloring is deactivated in files and if
|
show_debug |
logical vector of length 1 - Tells whether the debug logs must be displayed/written or not. Default is FALSE |
show_verbose |
logical vector of length 1 - Tells whether the verbose logs must be displayed/written or not. Default is FALSE |
show_info |
logical vector of length 1 - Tells whether the info logs must be displayed/written or not Default is TRUE. |
show_warning |
logical vector of length 1 - Tells whether the warning logs must be displayed/written or not Default is TRUE. |
show_error |
logical vector of length 1 - Tells whether the error logs must be displayed/written or not Default is TRUE. |
coloring |
named list - This lists maps a logging level to
its coloring. Like this: |
out_func |
function - the default function to print messages
in the terminal. The default is |
out_path |
list of file paths - Provide a list of file path where the logs will be written. It is not possible to separate different levels of logs in different log files for the moment. |
Value
A W4MLogger instance
Author(s)
L.Pavot
See Also
W4MLogger$info, W4MLogger$warning, W4MLogger$error, W4MLogger$debug, W4MLogger$verbose