Hadoop Online Training by Edureka

basicConfig: bootstrapping the logging package

Description Usage Arguments Details Examples

Description

'basicConfig' and 'logReset' provide a way to put the logging package in a know initial state.

Usage

1
2

Arguments

level

the logging level of the root logger. defaults to INFO. please do notice that this has no effect on the handling level of the handler that basicConfig attaches to the root logger.

Details

basicConfig

creates the root logger, attaches a console handler to it and sets the level of the handler to logging.level INFO. the level of the logger can be passed as a parameter to the function.

logReset

reinitializes the whole logging system as if the package had just been loaded. typically, you would want to call basicConfig immediately after a call to logReset.

Examples

1
2
3
4
5
6
library(logging)
basicConfig()
logdebug("not shown, basic is INFO")
logwarn("shown and timestamped")
logReset()
logwarn("not shown, as no handlers are present after a reset")


Search within the logging package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.