Module logging.config
Configuration functions for the logging package for Python. The core
package is based on PEP 282 and comments thereto in comp.lang.python, and
influenced by Apache's log4j system.
Should work under Python versions >= 1.5.2, except that source line
information is not available unless 'sys._getframe()' is.
Copyright (C) 2001-2009 Vinay Sajip. All Rights Reserved.
To use, simply 'import logging' and log away!
Function Summary |
|
fileConfig(fname,
defaults)
Read the logging configuration from a ConfigParser-format file. |
|
listen(port)
Start up a socket server on the specified port, and listen for new
configurations. |
|
stopListening()
Stop the listening server which was created with a call to
listen(). |
fileConfig(fname,
defaults=None)
Read the logging configuration from a ConfigParser-format file.
This can be called several times from an application, allowing an
end user the ability to select from various pre-canned configurations
(if the developer provides a mechanism to present the choices and load
the chosen configuration). In versions of ConfigParser which have the
readfp method [typically shipped in 2.x versions of Python], you can
pass in a file-like object rather than a filename, in which case the
file-like object will be read using readfp.
-
|
listen(port=9030)
Start up a socket server on the specified port, and listen for new
configurations.
These will be sent as a file suitable for processing by
fileConfig(). Returns a Thread object on which you can call start() to
start the server, and which you can join() when appropriate. To stop
the server, call stopListening().
-
|
stopListening()
Stop the listening server which was created with a call to
listen().
-
|
DEFAULT_LOGGING_CONFIG_PORT
-
- Type:
-
int
- Value:
|