k.log : module documentation

Part of kiwi

Extension to the logging module

This module defines a couple of extensions to the logging module included in the python standard distribution.

It creates an additional logging handler that print log records on the standard output. This handler is only showing records which has a level set to logging.WARNING or higher by default. The messages printed by this handler can be modified by using the environment variable called KIWI_LOG.

The syntax for the string which KIWI_LOG points to is the following:

   domain ':' level [, domain ':', level]

domain can contain wildcards such as * and ? level is an integer 1-5 which defines the minimal level:

Examples:

   KIWI_LOG="stoq*:5"

will print all the messages in a domain starting with stoq with DEBUG or higher:

   KIWI_LOG="kiwi*:4,stoq.*:5"

will print all the messages with INFO or higher in all domains starting with kiwi, and all the messages in the stoq.* domains which are DEBUG or higher

Inspiration for the syntax is taken from the debugging facilities of the GStreamer multimedia framework.

Class LogError Undocumented
Class Logger Undocumented
Class ReversedGlobalFilter It's like a reversed filter, the default behavior
Function set_log_file Set the filename used for logging.
Function set_log_level Set the log level.
Class _Logger Undocumented
Function _read_log_levels Undocumented
Function _create_console Undocumented
def set_log_file(filename, mask=None):
Set the filename used for logging.
Parametersfilename
maskoptional
def set_log_level(name, level):
Set the log level.
Parametersnamelogging category
levellevel
def _read_log_levels(console_filter):
Undocumented
def _create_console():
Undocumented
API Documentation for Kiwi, generated by pydoctor at 2010-05-20 02:10:57.