log_error {logr} | R Documentation |
Logs an error
Description
Writes an error message to the log. Error will be written both to the log and the message file. For the log, the error will be written at the point the function is called. This function is used internally.
Usage
log_error(msg = NULL)
Arguments
msg |
The message to log. |
See Also
log_warning
to write a warning message to the log.
Examples
library(logr)
# Create temp file location
tmp <- file.path(tempdir(), "test.log")
# Open log
lf <- log_open(tmp)
# Send error message to log
log_error("Here is a error")
# Close log
log_close()
# View results
writeLines(readLines(lf))
[Package logr version 1.3.8 Index]