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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
ZODB
Commits
edc33afc
Commit
edc33afc
authored
Jan 10, 2003
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for getting the logging from the configuration file.
parent
d9c84636
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
18 deletions
+10
-18
src/ZEO/runsvr.py
src/ZEO/runsvr.py
+10
-18
No files found.
src/ZEO/runsvr.py
View file @
edc33afc
...
...
@@ -265,26 +265,18 @@ class ZEOOptions(Options):
self
.
invalidation_queue_size
=
self
.
rootconf
.
zeo
.
invalidation_queue_size
def
load_logconf
(
self
):
# Get logging options from conf, unless overridden by environment
# XXX This still needs to be supported in the config schema.
reinit
=
0
if
os
.
getenv
(
"EVENT_LOG_FILE"
)
is
None
:
if
os
.
getenv
(
"STUPID_LOG_FILE"
)
is
None
:
path
=
None
# self.logconf.get("path")
if
path
is
not
None
:
os
.
environ
[
"EVENT_LOG_FILE"
]
=
path
os
.
environ
[
"STUPID_LOG_FILE"
]
=
path
reinit
=
1
if
os
.
getenv
(
"EVENT_LOG_SEVERITY"
)
is
None
:
if
os
.
getenv
(
"STUPID_LOG_SEVERITY"
)
is
None
:
level
=
None
# self.logconf.get("level")
if
level
is
not
None
:
os
.
environ
[
"EVENT_LOG_SEVERITY"
]
=
level
os
.
environ
[
"STUPID_LOG_SEVERITY"
]
=
level
reinit
=
1
if
reinit
:
if
self
.
rootconf
.
logger
is
not
None
:
zLOG
.
set_initializer
(
self
.
log_initializer
)
zLOG
.
initialize
()
def
log_initializer
(
self
):
from
zLOG
import
EventLogger
logger
=
self
.
rootconf
.
logger
()
for
handler
in
logger
.
handlers
:
if
hasattr
(
handler
,
"reopen"
):
handler
.
reopen
()
EventLogger
.
event_logger
.
logger
=
logger
def
load_storages
(
self
):
# Get the storage specifications
if
self
.
storages
:
...
...
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