Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ZODB
Commits
a2238de1
Commit
a2238de1
authored
Jan 10, 2003
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- remove a false statement in the module docstring
- add a way to control how logging is re-initialized
parent
d16ab137
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
6 deletions
+18
-6
src/zLOG/__init__.py
src/zLOG/__init__.py
+18
-6
No files found.
src/zLOG/__init__.py
View file @
a2238de1
...
...
@@ -68,10 +68,6 @@ with a callable object that takes 5 arguments:
traceback. If provided, then a summary of the error
is added to the detail.
The callable object can provide a reinitialize method that may be
called with no arguments to reopen the log files (if any) as part of a
log-rotation facility.
There is a default event logging facility that:
- swallows logging information by default,
...
...
@@ -86,7 +82,7 @@ There is a default event logging facility that:
can be overridden with the environment variable EVENT_LOG_SEVERITY
"""
__version__
=
'$Revision: 1.1
5
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.1
6
$'
[
11
:
-
2
]
from
EventLogger
import
log_write
,
log_time
,
severity_string
,
\
initialize_from_environment
...
...
@@ -105,10 +101,26 @@ PANIC = 300
# Flag indicating whether LOG() should call initialize()
_call_initialize
=
1
# Function called to (re-)initialize the logger we're using
_initializer
=
initialize_from_environment
def
initialize
():
global
_call_initialize
_call_initialize
=
0
initialize_from_environment
()
_initializer
()
def
set_initializer
(
func
):
"""Set the function used to re-initialize the logs.
This should be called when initialize_from_environment() is not
appropiate.
This does not ensure that the new function gets called; the caller
should do that separately.
"""
global
_initializer
_initializer
=
func
def
LOG
(
subsystem
,
severity
,
summary
,
detail
=
''
,
error
=
None
,
reraise
=
None
):
"""Log some information
...
...
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