level {log4r} | R Documentation |
Set or get the priority level for a logger object.
Description
The priority level can be an integer from the set 1..5 (otherwise it will be
modified sensibly to fit in that range), or a named logging level (one of
"DEBUG", "INFO", "WARN", "ERROR", or "FATAL"). An object of class loglevel
is also accepted; other input will be coerced using
as.loglevel
.
Usage
level(x)
level(x) <- value
## S3 method for class 'logger'
level(x)
## S3 replacement method for class 'logger'
level(x) <- value
Arguments
x |
An object of class logger. |
value |
A loglevel. |
See Also
Examples
library('log4r')
logger <- create.logger(logfile = 'debugging.log', level = 1)
level(logger)
level(logger) <- "FATAL"
[Package log4r version 0.4.3 Index]