File: bootstrapping.Rd

package info (click to toggle)
r-cran-logging 0.10-108-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 220 kB
  • sloc: sh: 13; makefile: 2
file content (41 lines) | stat: -rw-r--r-- 1,480 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/logger.R
\name{bootstrapping}
\alias{bootstrapping}
\alias{basicConfig}
\alias{logReset}
\title{Bootstrapping the logging package.}
\usage{
basicConfig(level = 20)

logReset()
}
\arguments{
\item{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.}
}
\description{
\code{basicConfig} and \code{logReset} provide a way to put the logging package
in a know initial state.
}
\details{
\code{basicConfig} creates the root logger, attaches a console handler(by
\var{basic.stdout} name) to it and sets the level of the handler to
\code{level}. You must not call \code{basicConfig} to for logger to work any more:
then root logger is created it gets initialized by default the same way as
\code{basicConfig} does. If you need clear logger to fill with you own handlers
use \code{logReset} to remove all default handlers.

\code{logReset} reinitializes the whole logging system as if the package had just been
loaded except it also removes all default handlers. Typically, you would want to call
\code{basicConfig} immediately after a call to \code{logReset}.
}
\examples{
basicConfig()
logdebug("not shown, basic is INFO")
logwarn("shown and timestamped")
logReset()
logwarn("not shown, as no handlers are present after a reset")

}