Class LogChannel[in Logging support]

Abstract class receiving log requests from log areas.

class LogChannel

more...

Summary

format()Gets or set the log message formatting setting.
level()Gets or set the log level.

Detailed description

class LogChannel


Abstract class receiving log requests from log areas.

This class cannot directly instantiated. Calling it directlty will generate a code error.

Methods

format()

Gets or set the log message formatting setting.

LogChannel.format( [format] )

formatthe new format to set (a string).
Returns:The current log message format (a string).

The message format is a template string filled with informations from the logging system. Some loggin subsystems (as the MS-Windows Event Logger, or as the Posix SYSLOG system) fill autonomously informations on behalf of the application, while others (file and stream based loggers) require a format to print meaningful informations as the timestamp.

The format string can contain the following escape codes:

For example, the pattern "%t\t%L (%M)\t%m" will print something like

   13:22:18.344   D (testbind)   Debug message from testbind.

The module also provides some standard log format code that can be useful in the most common situations as constants defined at toplevel. They are the following:

level()

Gets or set the log level.

LogChannel.level( [level] )

levela new log level to be set.
Returns:The current log level.

Made with faldoc 2.2.1