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: syslog constants behind rfc
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: BTaskaya, tryanunderwood@gmail.com, vinay.sajip
Priority: normal Keywords: patch

Created on 2020-01-10 17:54 by tryanunderwood@gmail.com, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 17945 merged vinay.sajip, 2020-01-10 19:16
Messages (5)
msg359746 - (view) Author: Ryan (tryanunderwood@gmail.com) Date: 2020-01-10 17:54
When using the SysLogHandler (https://docs.python.org/3/library/logging.handlers.html#logging.handlers.SysLogHandler) the supported facilities appear to be lagging the RFC (5454 ?), or at least what is being supported in other mainstream languages. I Specifically need LOG_AUDIT and LOG_NTP but there are a couple others. The syslog "openlog" function takes an INT but not sure how to get an INT through the python SysLogHandler because it's based on a static list of names and symbolic values.
Wikipedia (https://en.wikipedia.org/wiki/Syslog#Facility) suggests LOG_AUTH and LOG_NTP are in the RFC. 
This is my first ticket here so hopefully this is the right place for it. Maybe there is a workaround or some re-education needed on my part...
msg359750 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2020-01-10 19:37
New changeset ce54519aa09772f4173b8c17410ed77e403f3ebf by Vinay Sajip in branch 'master':
bpo-39292: Add missing syslog facility codes. (GH-17945)
https://github.com/python/cpython/commit/ce54519aa09772f4173b8c17410ed77e403f3ebf
msg359758 - (view) Author: Batuhan Taskaya (BTaskaya) * (Python committer) Date: 2020-01-10 21:20
@vinay.sajip PR 17945 looks resolved this, can this issue be closed?
msg359760 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2020-01-10 21:40
> can this issue be closed?

Not quite yet. Waiting for feedback from the original reporter as to whether this change meets the requirements. I've also treated this as an enhancement rather than a bug, and so I am not currently planning to back-port these changes. I will close this issue once I get feedback.
msg359793 - (view) Author: Ryan (tryanunderwood@gmail.com) Date: 2020-01-11 13:00
Thank you, this looks good. I'm pinned to 3.6 so while it won't work for me currently, maybe it will in a few years.
For clarity and because I can't edit my original message, the RFC is 5424 (I had mistakenly said 5454 but you got it right).
History
Date User Action Args
2022-04-11 14:59:25adminsetgithub: 83473
2020-01-12 06:16:00vinay.sajipsetstatus: open -> closed
stage: patch review -> resolved
resolution: fixed
versions: - Python 3.7, Python 3.8
2020-01-11 13:00:59tryanunderwood@gmail.comsetmessages: + msg359793
2020-01-10 21:40:19vinay.sajipsetmessages: + msg359760
2020-01-10 21:20:48BTaskayasetnosy: + BTaskaya
messages: + msg359758
2020-01-10 19:37:54vinay.sajipsetmessages: + msg359750
2020-01-10 19:16:05vinay.sajipsetkeywords: + patch
stage: patch review
pull_requests: + pull_request17353
2020-01-10 18:14:20SilentGhostsettype: behavior
versions: - Python 2.7, Python 3.5, Python 3.6
2020-01-10 18:12:24xtreaksetnosy: + vinay.sajip
2020-01-10 17:54:35tryanunderwood@gmail.comcreate