level: Set or get the priority level for a logger object.

Description Usage Arguments See Also Examples

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

1
2
3
4
5
6
7
8
9
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

loglevel

Examples

1
2
3
4
5
library('log4r')

logger <- create.logger(logfile = 'debugging.log', level = 1)
level(logger)
level(logger) <- "FATAL"

log4r documentation built on Jan. 18, 2020, 9:06 a.m.