log: entry points for logging actions

Description Usage Arguments Examples

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

1
2
3
4
logdebug(msg, ..., logger='')
loginfo(msg, ..., logger='')
logwarn(msg, ..., logger='')
logerror(msg, ..., logger='')

Arguments

msg

the textual message to be output, or the format for the ... arguments

...

if present, msg is interpreted as a format and the ... values are passed to it to form the actual message.

logger

the name of the logger to which we pass the record

Examples

1
2
3
4
logReset()
addHandler(writeToConsole)
loginfo('this goes to console')
logdebug('this stays silent')

Example output

2021-02-23 11:32:55 INFO::this goes to console

logging documentation built on May 2, 2019, 4:46 p.m.