Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
Kirill Smelkov
Zope
Commits
7f7d55af
Commit
7f7d55af
authored
Jan 08, 2006
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zLOG -> logging
parent
6734f4b2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
lib/python/ZServer/medusa/ftp_server.py
lib/python/ZServer/medusa/ftp_server.py
+1
-1
lib/python/ZServer/utils.py
lib/python/ZServer/utils.py
+8
-6
No files found.
lib/python/ZServer/medusa/ftp_server.py
View file @
7f7d55af
...
...
@@ -705,7 +705,7 @@ class ftp_server (asyncore.dispatcher):
self
.
ip
=
ip
self
.
port
=
port
self
.
authorizer
=
authorizer
if
hostname
is
None
:
self
.
hostname
=
socket
.
gethostname
()
else
:
...
...
lib/python/ZServer/utils.py
View file @
7f7d55af
...
...
@@ -13,24 +13,26 @@
""" A set of utility routines used by asyncore initialization """
def
getZopeVersion
():
import
App.version_txt
return
App
.
version_txt
.
version_txt
()
def
patchAsyncoreLogger
():
# Poke zLOG default logging into asyncore to send
# messages to zLOG instead of medusa logger
from
zLOG
import
LOG
,
register_subsystem
,
BLATHER
,
INFO
,
WARNING
,
ERROR
# Poke the Python logging module into asyncore to send messages to logging
# instead of medusa logger
from
logging
import
getLogger
LOG
=
getLogger
(
'ZServer'
)
register_subsystem
(
'ZServer'
)
severity
=
{
'info'
:
INFO
,
'warning'
:
WARNING
,
'error'
:
ERROR
}
def
log_info
(
self
,
message
,
type
=
'info'
):
if
message
[:
14
]
==
'adding channel'
or
\
message
[:
15
]
==
'closing channel'
or
\
message
==
'Computing default hostname'
:
LOG
(
'ZServer'
,
BLATHER
,
message
)
LOG
.
debug
(
message
)
else
:
LOG
(
'ZServer'
,
severity
[
type
],
message
)
getattr
(
LOG
,
severity
)(
message
)
import
asyncore
asyncore
.
dispatcher
.
log_info
=
log_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