openlog | R Documentation |
set log file name, if the file or directory doesn't exist, it will be created and open file connection
openlog(log_name, log_level = INFO, rotate = c("size", "daily",
"none"), max_size = 100, backup_n = 5L, units = c("Kb", "b", "Mb",
"Gb", "Tb", "Pb"), as_json = TRUE, is_print = FALSE,
verbose = FALSE)
log_name |
log file name |
log_level |
'ERROR', 'WARN', 'INFO' or 'DEBUG', constant in this package |
rotate |
'size' or 'daily', the type of rotate log |
max_size |
the max file size in bytes |
backup_n |
the backup log files number, must be non-negative |
units |
the max size units, should be one of 'Kb', 'b', 'Mb', 'Gb', 'Tb', 'Pb' |
as_json |
if all log input will be convert to json, default is true |
is_print |
if print log content to console |
verbose |
if print success message |
## Not run:
openlog('log/log')
openlog('log/log', log_level = ERROR) # only check log when error happened
openlog('log/log', rotate = 'daily')
openlog('log/log', max_size = 3, units = 'Mb')
openlog('log/log', backup_n = 10)
openlog('log/log', as_json = FALSE)
openlog('log/log', is_print = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.