This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Facility and priority values/constants not documented for SysLogHandler
Type: enhancement Stage:
Components: Documentation Versions: Python 3.1, Python 3.2, Python 2.7, Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: vinay.sajip Nosy List: eric.smith, georg.brandl, scop, vinay.sajip
Priority: normal Keywords:

Created on 2010-03-24 09:24 by scop, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (5)
msg101629 - (view) Author: Ville Skyttä (scop) * Date: 2010-03-24 09:24
http://docs.python.org/dev/py3k/library/logging.html#logging.handlers.SysLogHandler

What to use as the value for facility for SysLogHandler's constructor is not documented.  There's a reference to LOG_USER, but it's kind of vague because it doesn't specify what LOG_USER it refers to - there's no mention that SysLogHandler itself has these constants.  And the corresponding documented values from the syslog module are not compatible with the ones SysLogHandler works with.

Similarly, the values for facility and priority for SysLogHandler.encodePriority() are not documented, it just talks about integers and strings without saying what they are.

I suggest documenting all the SysLogHandler.LOG_* constants and the priority and facility mapping strings in SysLogHandler's priority_names and facility_names dicts.
msg101633 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2010-03-24 14:33
Update showing strings and corresponding symbolic integers checked into trunk (r79373).
msg101634 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2010-03-24 14:48
It still doesn't say that the LOG_ constants are defined on SysLogHandler. Or is the intention that the user just use the strings?
msg101637 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2010-03-24 15:11
> From: Eric Smith <report@bugs.python.org>

> It still doesn't say that the LOG_ constants are defined on 
> SysLogHandler. Or is the intention that the user just use the 
> strings?

Whoops, now fixed (I think).
msg101638 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2010-03-24 15:28
> Vinay Sajip <vinay_sajip@yahoo.co.uk> added the comment:
> Whoops, now fixed (I think).

Looks good. Thanks!
History
Date User Action Args
2022-04-11 14:56:59adminsetgithub: 52466
2010-03-24 15:28:21eric.smithsetmessages: + msg101638
2010-03-24 15:11:51vinay.sajipsetmessages: + msg101637
2010-03-24 14:48:33eric.smithsetmessages: + msg101634
2010-03-24 14:33:21vinay.sajipsetstatus: open -> closed
resolution: fixed
messages: + msg101633
2010-03-24 11:59:03vinay.sajipsetassignee: georg.brandl -> vinay.sajip
2010-03-24 11:30:24eric.smithsetpriority: normal
nosy: + vinay.sajip

versions: + Python 2.6, Python 3.1, Python 2.7, Python 3.2
2010-03-24 11:15:17eric.smithsetnosy: + eric.smith
2010-03-24 09:24:23scopcreate