Logger (gb.logging)
This class provides the basic mechanism for sending messages to a log.
As you can create as many Logger objects as you like, this component provides an excellent means
to manage multiple active logs.
For a more advanced usage, you can use a
ComplexLogger to define multiple
Output, or even define your own, like sending the data over a TCP connection!
Deze klasse kan gebruikt worden als een object door een verborgen instantie op verzoek te creƫren.
Deze klasse is
creƫerbaar.
Deze klasse kan gebruikt worden als een
funktie.
Constanten
Critical
|
Constant that defines a log message as Critical.
|
Debug
|
Constant that defines a log message as being of Debug information level.
|
DefaultFormat
|
|
Error
|
Constant that defines a log message as being of Error level.
|
Info
|
Constant that defines a log message as being of Info (informational) level.
|
Stderr
|
Constant that defines a log message as being of standard error level.
|
Stdout
|
Constant that defines a log message as being of standard output level.
|
Warning
|
Constant that defines a log message as being of Warning level.
|
Eigenschappen
Enabled
|
Returns or sets the status of the Logger. If set to False, every call to Log will be ignored.
|
Format
|
Sets or returns the format for log messages produced by the Logger object.
|
Level
|
Sets or returns the minimum logging level for the Logger object.
The levels are defined by the component's constants, viz
|
Output
|
Returns the path to where the log is being saved.
|
Methode
Begin
|
Initializes the Logger. You need to call this method before logging anything, it will make sure that the Output file is available and ready to be written.
|
Log
|
Writes sMessage to the log file, or to the defined output if the call to isEnabledFor returns True for the level iLevel .
|
isEnabledFor
|
Returns whether the Logger object is enabled for (i.e. will not ignore messages for) the message level
specified by iLevel.
|