This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Add API to logging package to allow intercooperation.
Type: Stage:
Components: Library (Lib) Versions: Python 2.4
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: vinay.sajip Nosy List: dmw, vinay.sajip
Priority: normal Keywords: patch

Created on 2004-09-21 22:07 by dmw, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit dmw, 2004-09-21 22:07
liblogging.tex-getLoggerClass.diff dmw, 2004-09-21 22:08 liblogging.tex-getLoggerClass.diff dmw, 2004-09-21 22:08
liblogging.tex-loggerClass.diff dmw, 2004-09-21 22:11 liblogging.tex-loggerClass.diff
Messages (2)
msg46924 - (view) Author: Dave Wilson (dmw) Date: 2004-09-21 22:07
This set of patches implements two simple ways in which
the logging package could be extended to allow more
than one body of code to customize the base Logger class.

The first patch (and doc patch) implements a
"getLoggerClass()" function symmentrical to the
existing "setLoggerClass()" function.

The second patch instead renames the internal
"_loggerClass" variable to "loggerClass", leaving the
old setLoggerClass() function for compatibility.

The problem with the logging module at present is that
if I wish to define extra functionality in the Logger
class for use with my application or package, and
another package that I make use of does the same, then
one set of Logger class customisations will be lost.

Using the above patches, the standard way to extend
Logger would go from:

   class MyLogger(logging.Logger):


   class MyLogger(logging.getLoggerClass()):

or alternatively for the second patch:

   class MyLogger(logging.loggerClass):


msg46925 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2004-09-22 13:40
Logged In: YES 

getLogger() version checked into CVS.
Date User Action Args
2022-04-11 14:56:07adminsetgithub: 40940
2004-09-21 22:07:32dmwcreate