]> granicus.if.org Git - python/commitdiff
Added getLoggerClass()
authorVinay Sajip <vinay_sajip@yahoo.co.uk>
Wed, 22 Sep 2004 12:55:16 +0000 (12:55 +0000)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>
Wed, 22 Sep 2004 12:55:16 +0000 (12:55 +0000)
Doc/lib/liblogging.tex

index ecb3791dfb8f97129382619ba0c8c55062d99324..cfbb8384f10da5792c6473ccdef856be9a6a279d 100644 (file)
@@ -144,6 +144,19 @@ This means that logger instances never need to be passed between different
 parts of an application.
 \end{funcdesc}
 
+\begin{funcdesc}{getLoggerClass}{}
+Return either the standard \class{Logger} class, or the last class passed to
+\function{setLoggerClass()}. This function may be called from within a new
+class definition, to ensure that installing a customised \class{Logger} class
+will not undo customisations already applied by other code. For example:
+
+\begin{verbatim}
+ class MyLogger(logging.getLoggerClass()):
+     # ... override behaviour here
+\end{verbatim}
+
+\end{funcdesc}
+
 \begin{funcdesc}{debug}{msg\optional{, *args\optional{, **kwargs}}}
 Logs a message with level \constant{DEBUG} on the root logger.
 The \var{msg} is the message format string, and the \var{args} are the