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
bd83764d
Commit
bd83764d
authored
Jan 23, 2003
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refine the log handlers in the zLOG schema component a bit to make
configuration files easier to read.
parent
562d9c29
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
src/zLOG/component.xml
src/zLOG/component.xml
+5
-5
src/zLOG/datatypes.py
src/zLOG/datatypes.py
+4
-4
No files found.
src/zLOG/component.xml
View file @
bd83764d
...
...
@@ -22,7 +22,7 @@
<sectiontype
name=
"syslog"
datatype=
".syslog_handler"
implements=
"loghandler"
extends=
"base-log-handler"
>
<key
name=
"facility"
default=
"user"
datatype=
".syslog_facility"
/>
<key
name=
"address"
datatype=
"socket-address"
required=
"yes
"
/>
<key
name=
"address"
datatype=
"socket-address"
default=
"localhost:514
"
/>
<key
name=
"format"
default=
"%(message)s"
datatype=
".log_format"
/>
</sectiontype>
...
...
@@ -36,7 +36,7 @@
<sectiontype
name=
"http-logger"
datatype=
".http_handler"
implements=
"loghandler"
extends=
"base-log-handler"
>
<key
name=
"url"
default=
"
localhost
"
datatype=
".http_handler_url"
/>
<key
name=
"url"
default=
"
http://localhost/
"
datatype=
".http_handler_url"
/>
<key
name=
"method"
default=
"GET"
datatype=
".get_or_post"
/>
<key
name=
"format"
default=
"%(asctime)s %(message)s"
datatype=
".log_format"
/>
...
...
@@ -44,10 +44,10 @@
<sectiontype
name=
"email-notifier"
datatype=
".smtp_handler"
implements=
"loghandler"
extends=
"base-log-handler"
>
<key
name=
"from
addr"
required=
"yes
"
/>
<multikey
name=
"to
addr
"
required=
"yes"
attribute=
"toaddrs"
/>
<key
name=
"from
"
required=
"yes"
attribute=
"fromaddr
"
/>
<multikey
name=
"to"
required=
"yes"
attribute=
"toaddrs"
/>
<key
name=
"subject"
default=
"Message from Zope"
/>
<key
name=
"
host
"
default=
"localhost"
datatype=
"inet-address"
/>
<key
name=
"
smtp-server
"
default=
"localhost"
datatype=
"inet-address"
/>
<key
name=
"format"
default=
"%(asctime)s %(message)s"
datatype=
".log_format"
/>
</sectiontype>
...
...
src/zLOG/datatypes.py
View file @
bd83764d
...
...
@@ -120,9 +120,9 @@ _syslog_facilities = {
def
syslog_facility
(
value
):
value
=
value
.
lower
()
if
not
_syslog_facilities
.
has_key
(
value
):
raise
ValueError
(
"Syslog facility must be one of "
+
", "
.
join
(
_syslog_facilities
.
keys
()
))
L
=
_syslog_facilities
.
keys
()
L
.
sort
()
raise
ValueError
(
"Syslog facility must be one of "
+
", "
.
join
(
L
))
return
value
def
syslog_handler
(
section
):
...
...
@@ -200,7 +200,7 @@ def smtp_handler(section):
inst
.
setFormatter
(
logging
.
Formatter
(
format
,
dateformat
))
inst
.
setLevel
(
level
)
host
,
port
=
section
.
host
host
,
port
=
section
.
smtp_server
if
not
port
:
mailhost
=
host
else
:
...
...
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