Added relativeCreated to Formatter doc (has been in the system for a long time - was unaccountably left out of the docs and not noticed until now).
Documentation clarified to mention optional parameters. Documentation omitted the additional parameter to LogRecord.__init__ which was added in 2.5. (See SF #1569622).
This commit is contained in:
parent
6cdc34672c
commit
73fa6b58dd
|
@ -530,8 +530,8 @@ as those created locally. Logger-level filtering is applied using
|
||||||
\method{filter()}.
|
\method{filter()}.
|
||||||
\end{methoddesc}
|
\end{methoddesc}
|
||||||
|
|
||||||
\begin{methoddesc}{makeRecord}{name, lvl, fn, lno, msg, args, exc_info,
|
\begin{methoddesc}{makeRecord}{name, lvl, fn, lno, msg, args, exc_info
|
||||||
func, extra}
|
\optional{, func, extra}}
|
||||||
This is a factory method which can be overridden in subclasses to create
|
This is a factory method which can be overridden in subclasses to create
|
||||||
specialized \class{LogRecord} instances.
|
specialized \class{LogRecord} instances.
|
||||||
\versionchanged[\var{func} and \var{extra} were added]{2.5}
|
\versionchanged[\var{func} and \var{extra} were added]{2.5}
|
||||||
|
@ -1399,6 +1399,9 @@ Currently, the useful mapping keys in a \class{LogRecord} are:
|
||||||
(if available).}
|
(if available).}
|
||||||
\lineii{\%(created)f} {Time when the \class{LogRecord} was created (as
|
\lineii{\%(created)f} {Time when the \class{LogRecord} was created (as
|
||||||
returned by \function{time.time()}).}
|
returned by \function{time.time()}).}
|
||||||
|
\lineii{\%(relativeCreated)d} {Time in milliseconds when the LogRecord was
|
||||||
|
created, relative to the time the logging module was
|
||||||
|
loaded.}
|
||||||
\lineii{\%(asctime)s} {Human-readable time when the \class{LogRecord}
|
\lineii{\%(asctime)s} {Human-readable time when the \class{LogRecord}
|
||||||
was created. By default this is of the form
|
was created. By default this is of the form
|
||||||
``2003-07-08 16:49:45,896'' (the numbers after the
|
``2003-07-08 16:49:45,896'' (the numbers after the
|
||||||
|
@ -1481,7 +1484,7 @@ source line where the logging call was made, and any exception
|
||||||
information to be logged.
|
information to be logged.
|
||||||
|
|
||||||
\begin{classdesc}{LogRecord}{name, lvl, pathname, lineno, msg, args,
|
\begin{classdesc}{LogRecord}{name, lvl, pathname, lineno, msg, args,
|
||||||
exc_info}
|
exc_info \optional{, func}}
|
||||||
Returns an instance of \class{LogRecord} initialized with interesting
|
Returns an instance of \class{LogRecord} initialized with interesting
|
||||||
information. The \var{name} is the logger name; \var{lvl} is the
|
information. The \var{name} is the logger name; \var{lvl} is the
|
||||||
numeric level; \var{pathname} is the absolute pathname of the source
|
numeric level; \var{pathname} is the absolute pathname of the source
|
||||||
|
@ -1491,7 +1494,9 @@ user-supplied message (a format string); \var{args} is the tuple
|
||||||
which, together with \var{msg}, makes up the user message; and
|
which, together with \var{msg}, makes up the user message; and
|
||||||
\var{exc_info} is the exception tuple obtained by calling
|
\var{exc_info} is the exception tuple obtained by calling
|
||||||
\function{sys.exc_info() }(or \constant{None}, if no exception information
|
\function{sys.exc_info() }(or \constant{None}, if no exception information
|
||||||
is available).
|
is available). The \var{func} is the name of the function from which the
|
||||||
|
logging call was made. If not specified, it defaults to \var{None}.
|
||||||
|
\versionchanged[\var{func} was added]{2.5}
|
||||||
\end{classdesc}
|
\end{classdesc}
|
||||||
|
|
||||||
\begin{methoddesc}{getMessage}{}
|
\begin{methoddesc}{getMessage}{}
|
||||||
|
|
Loading…
Reference in New Issue