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
1397ce18
Commit
1397ce18
authored
Dec 24, 2010
by
Vinay Sajip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Logging documentation updates.
parent
efbcb1b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
Doc/howto/logging-cookbook.rst
Doc/howto/logging-cookbook.rst
+7
-8
No files found.
Doc/howto/logging-cookbook.rst
View file @
1397ce18
...
@@ -13,14 +13,13 @@ This page contains a number of recipes related to logging, which have been found
...
@@ -13,14 +13,13 @@ This page contains a number of recipes related to logging, which have been found
Using logging in multiple modules
Using logging in multiple modules
---------------------------------
---------------------------------
It was mentioned above that multiple calls to
Multiple calls to ``logging.getLogger('someLogger')`` return a reference to the
``logging.getLogger('someLogger')`` return a reference to the same logger
same logger object. This is true not only within the same module, but also
object. This is true not only within the same module, but also across modules
across modules as long as it is in the same Python interpreter process. It is
as long as it is in the same Python interpreter process. It is true for
true for references to the same object; additionally, application code can
references to the same object; additionally, application code can define and
define and configure a parent logger in one module and create (but not
configure a parent logger in one module and create (but not configure) a child
configure) a child logger in a separate module, and all logger calls to the
logger in a separate module, and all logger calls to the child will pass up to
child will pass up to the parent. Here is a main module::
the parent. Here is a main module::
import logging
import logging
import auxiliary_module
import auxiliary_module
...
...
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