[Python-checkins] python/dist/src/Doc/lib liblogging.tex,1.33,1.34

vsajip at users.sourceforge.net vsajip at users.sourceforge.net
Thu Dec 2 22:27:45 CET 2004


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7616

Modified Files:
	liblogging.tex 
Log Message:
Fixed errors reported in SF bug #1074693

Index: liblogging.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/liblogging.tex,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- liblogging.tex	11 Nov 2004 13:54:48 -0000	1.33
+++ liblogging.tex	2 Dec 2004 21:27:42 -0000	1.34
@@ -35,6 +35,21 @@
 more general \class{Logger} method, \method{log()}, which takes an
 explicit level argument.
 
+The numeric values of logging levels are given in the following table. These
+are primarily of interest if you want to define your own levels, and need
+them to have specific values relative to the predefined levels. If you
+define a level with the same numeric value, it overwrites the predefined
+value; the predefined name is lost.
+
+\begin{tableii}{l|l}{code}{Level}{Numeric value}
+  \lineii{CRITICAL}{50}
+  \lineii{ERROR}{40}
+  \lineii{WARNING}{30}
+  \lineii{INFO}{20}
+  \lineii{DEBUG}{10}
+  \lineii{NOTSET}{0}
+\end{tableii}
+
 Levels can also be associated with loggers, being set either by the
 developer or through loading a saved logging configuration. When a
 logging method is called on a logger, the logger compares its own
@@ -297,8 +312,9 @@
 Sets the threshold for this logger to \var{lvl}. Logging messages
 which are less severe than \var{lvl} will be ignored. When a logger is
 created, the level is set to \constant{NOTSET} (which causes all messages
-to be processed in the root logger, or delegation to the parent in non-root
-loggers).
+to be processed when the logger is the root logger, or delegation to the
+parent when the logger is a non-root logger). Note that the root logger
+is created with level \constant{WARNING}.
 \end{methoddesc}
 
 \begin{methoddesc}{isEnabledFor}{lvl}
@@ -1324,10 +1340,6 @@
 source line where the logging call was made, and any exception
 information to be logged.
 
-\class{LogRecord} has no methods; it's just a repository for
-information about the logging event. The only reason it's a class
-rather than a dictionary is to facilitate extension.
-
 \begin{classdesc}{LogRecord}{name, lvl, pathname, lineno, msg, args,
                              exc_info}
 Returns an instance of \class{LogRecord} initialized with interesting
@@ -1342,6 +1354,11 @@
 is available).
 \end{classdesc}
 
+\begin{methoddesc}{getMessage}{}
+Returns the message for this \class{LogRecord} instance after merging any
+user-supplied arguments with the message.
+\end{methoddesc}
+
 \subsection{Thread Safety}
 
 The logging module is intended to be thread-safe without any special work



More information about the Python-checkins mailing list