Trees | Indices | Help |
---|
|
Logging module.
Five levels of log information are defined. These are, in order of decreasing verbosity: log, debug, info, warning, error.
This module provides a Loggable class for objects, as well as various convenience methods for logging in general, and for logging with Twisted and failures in particular. It is written such a way that it can be reused in different projects to provide a controllable logging mechanism.
Maintainer: Thomas Vander Stichele
|
|||
Loggable Base class for objects that want to be able to log messages with different level of severity. |
|||
TwistedLogObserver Twisted log observer that integrates with our logging. |
|||
LogHandler A standard library logging handler that logs through the log system of this module. |
|
|||
str |
|
||
list of str |
|
||
int |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
tuple of (str, int) |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
str |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
_DEBUG =
|
|||
_ENV_VAR_NAME = None hash(x) |
|||
_PACKAGE_SCRUB_LIST =
|
|||
_categories =
|
|||
_log_handlers =
|
|||
_log_handlers_limited =
|
|||
_initialized = False
|
|||
_stdout = None hash(x) |
|||
_stderr = None hash(x) |
|||
_old_hup_handler = None hash(x) |
|||
COLORS =
|
|||
_FORMATTED_LEVELS =
|
|||
_LEVEL_NAMES =
|
|||
_initializedTwisted = False
|
|||
__theTwistedLogObserver = None hash(x) |
|||
DEBUG = 4
|
|||
ERROR = 1 hash(x) |
|||
INFO = 3
|
|||
LOG = 5
|
|||
WARN = 2 hash(x) |
|||
__package__ =
|
|
Return the name of a log level.
|
Return a list with the level names
|
Return the integer value of the levelName.
|
Register a given category in the debug system. A level will be assigned to it based on previous calls to setDebug. |
|
Update the current log settings. This can restore an old saved log settings object returned by getLogSettings
|
Fetches the current log settings. The returned object can be sent to setLogSettings to restore the returned settings
|
Return the filename and line number for the given location. If where is a negative integer, look for the code entry in the current stack that is the given number of frames above this module. If where is a function, look for the code entry of the function.
|
Helper function to create a format and args to use for logging. This avoids needlessly interpolating variables. |
|
Log a fatal error message in the given category. This will also raise
a |
Log a warning message in the given category. This is used for non-fatal problems. |
Log a log message. Used for debugging recurring events. |
A log handler that writes to stderr.
|
Initialize the logging system and parse the environment variable of the given name. Needs to be called before starting the actual application. |
Set the DEBUG string. This controls the log output. |
Set the package names to scrub from filenames. Filenames from these paths in log messages will be scrubbed to their relative file path instead of the full absolute path.
|
Add a custom log handler.
|
Add a custom log handler.
|
Remove a registered log handler.
|
Remove a registered limited log handler.
|
Return a short message based on an exception, useful for debugging. Tries to find where the exception was triggered. |
Redirect stdout and stderr to named files. Records the file names so that a future call to reopenOutputFiles() can open the same files. Installs a SIGHUP handler that will reopen the output files. Note that stderr is opened unbuffered, so if it shares a file with stdout then interleaved output may not appear in the order that you expect. |
Return a short message based on |
Log a warning about a Failure. Useful as an errback handler: d.addErrback(warningFailure)
|
Integrate twisted's logger with our logger. This is done in a separate method because calling this imports and sets up a reactor. Since we want basic logging working before choosing a reactor, we need to separate these. |
Make a logger from the standard library log through the Flumotion logging system.
|
|
COLORS
|
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Tue Aug 13 06:16:56 2013 | http://epydoc.sourceforge.net |