Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
89c00ce3
Commit
89c00ce3
authored
Jun 10, 2011
by
Vinay Sajip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated Formatter.formatTime docs to indicate configuration via class attributes.
parent
bbbee04e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
Doc/library/logging.rst
Doc/library/logging.rst
+12
-0
No files found.
Doc/library/logging.rst
View file @
89c00ce3
...
...
@@ -453,6 +453,18 @@ The useful mapping keys in a :class:`LogRecord` are given in the section on
record. Otherwise, the ISO8601 format is used. The resulting string is
returned.
.. versionchanged:: 3.3
Previously, the default ISO 8601 format was hard-coded as in this
example: ``2010-09-06 22:38:15,292`` where the part before the comma is
handled by a strptime format string (``'
%
Y
-%
m
-%
d
%
H
:%
M
:%
S
'``), and the
part after the comma is a millisecond value. Because strptime does not
have a format placeholder for milliseconds, the millisecond value is
appended using another format string, ``'
%
s
,%
03
d
'`` – and both of these
format strings have been hardcoded into this method. With the change,
these strings are defined as class-level attributes which can be
overridden at the instance level when desired. The names of the
attributes are ``default_time_format`` (for the strptime format string)
and ``default_msec_format`` (for appending the millisecond value).
.. method:: formatException(exc_info)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment