bdpar.log | R Documentation |
bdpar.log
is responsible for managing the messages to
show on the log.
bdpar.log(message, level = "INFO", className = NULL, methodName = NULL)
message |
A string to be printed to the log with the corresponding priority level. |
level |
The desired priority level (DEBUG,INFO,WARN,ERROR and FATAL). In the case of the FATAL level will be call to the stop function. Also, if the level is WARN, the message will be a warning. |
className |
A string to indicated in which class is called to the log. If the value is NULL, this field is not shown in the log. |
methodName |
A string to indicated in which method is called to the log. If the value is NULL, this field is not shown in the log. |
The format output is as following:
[currentTime][className][methodName][level] message
The type of message changes according to the level indicated:
- The DEBUG,INFO and ERROR levels return a text
using the message
function.
- The WARN level returns a text using the warning
function.
- The FATAL level returns a text using the stop
function.
In the case of multithreading, the log will only be by file.
bdpar.Options
## Not run:
# First step, configure the behavior of log
bdpar.options$configureLog(console = TRUE, threshold = "DEBUG", file = NULL)
message <- "Message example"
className <- "Class name example"
methodName <- "Method name example"
bdpar.log(message = message, level = "DEBUG", className = NULL, methodName = NULL)
bdpar.log(message = message, level = "INFO", className = className, methodName = methodName)
bdpar.log(message = message, level = "WARN", className = className, methodName = NULL)
bdpar.log(message = message, level = "ERROR", className = NULL, methodName = NULL)
bdpar.log(message = message, level = "FATAL", className = NULL, methodName = methodName)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.