Learn R Programming

logging (version 0.10-108)

getHandler: Retrieves a handler from a logger.

Description

Handlers are not uniquely identified by their name. Only within the logger to which they are attached is their name unique. This function is here to allow you grab a handler from a logger so you can examine and alter it.

Typical use of this function is in setLevel(newLevel, getHandler(...)).

Usage

getHandler(handler, logger = "")

Arguments

handler

The name of the handler, or its action.

logger

Optional: the name of the logger. Defaults to the root logger.

Value

The retrieved handler object. It returns NULL if handler is not registerd.

Examples

Run this code
# NOT RUN {
logReset()
addHandler(writeToConsole)
getHandler("basic.stdout")

# }

Run the code above in your browser using DataLab