Learn R Programming

logging (version 0.8-104)

loginfo: entry points for logging actions

Description

generate a log record and pass it to the logging system.

a log record gets timestamped and will be independently formatted by each of the handlers handling it.

leading and trailing whitespace is stripped from the final message.

Usage

logdebug(msg, ..., logger='')
loginfo(msg, ..., logger='')
logwarn(msg, ..., logger='')
logerror(msg, ..., logger='')

Arguments

msg

if character, the textual message to be output, or the format for the ... arguments; if of any other type, will be output as is prefixed by the expression that was used for the function call

...

if present, and msg is ofcharacter, msg is interpreted as a format and the ... values are passed to it to form the actual message; if msg is any other type, all ... values are output the same way like msg

logger

the name of the logger to which we pass the record

Examples

Run this code
# NOT RUN {
logReset()
addHandler(writeToConsole)
loginfo('this goes to console')
logdebug('this stays silent')
loginfo(3 + 5, 2 * 3)
# }

Run the code above in your browser using DataLab