Package AccessEngine :: Module AELog
[hide private]
[frames] | no frames]

Module AELog

source code

Defines a function for configuring the standard Python logging module, a class that redirects print statements through the configured logging system, and a class that defines a logging handler using XML-RPC as the transport.


Authors:
Peter Parente, Frank Zenker
Organizations: Copyright: License:
Classes [hide private]
  XMLRPCHandler
Defines an XML-RPC handler for the standard Python logging system.
  PrintLogger
Provides a dirt-simple interface compatible with stdout and stderr.
Functions [hide private]
 
configure(log_conf=None, log_level=None, log_channels=None, log_file=None)
Configures the logging system based on the setting specified on the command line or Python logging module compatible configuration file.
source code
Variables [hide private]
string LOG_FORMAT = '[%(name)s %(levelname)s %(asctime)s] %(message)s'
Default log output format
Function Details [hide private]

configure(log_conf=None, log_level=None, log_channels=None, log_file=None)

source code 
Configures the logging system based on the setting specified on the command line or Python logging module compatible configuration file. Defaults to logging messages at the INFO level or higher to stdout. Options in the configuration file always override those given on the command line.
Parameters:
  • log_conf (string) - Filename of a logging module configuration file. See http://antonym.org/node/76 and http://docs.python.org/lib/logging-config-fileformat.html.
  • log_level (integer) - Include messages at this level or higher
  • log_channels (list of string) - Include messages sent only on these channels, or None meaning all
  • log_file (string) - Log messages in a basic, fixed format to this file. Provided for convenience for users who do not want to write their own logging conf file.