Description Usage Arguments Details See Also Examples
Initialises the logging to the console and optionally a file.
1 | start_logging(level = "INFO", file = NULL, logger = "", reset = TRUE)
|
level |
The logging level of the root logger. Defaults to "INFO". |
file |
Optional file name or path for logging to a file. Defaults to NULL. |
logger |
Character string indicating the logger for the handler. Defaults to the root logger. |
reset |
Boolean value indicating whether to reset the logging to the |
Starts logging by loading the logging
package, resetting the logging
(reset = TRUE, the default). Then it sets up a handler to log to the console,
and if a file has been specified it sets up a handler to log to the file.
Finally a message is logged at the INFO level to indicate that the logging has been started.
logging
a tentative logging package
1 2 3 4 5 | start_logging()
start_logging(file = 'log.txt')
start_logging( level = 'CRITICAL'
, logger = 'my_logger'
, reset = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.