gh-87286: Add a number of LOG_* constants to syslog (#24432)

* bpo-43120: Add a number of LOG_* constants to syslog

This adds a number of syslog facilities to the syslogmodule.c.
These values are available on macOS.

* Switch contant documentation to the data directive

This fixes a CI warning and matches the pattern
used in the documentation for ``os``.

* Update Doc/library/syslog.rst


Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
Ronald Oussoren 2023-12-12 10:25:51 +01:00 • committed by GitHub
parent e0fb7004ed
commit 0d2fe6bab0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 82 additions and 16 deletions

View file

@ -406,6 +406,30 @@ syslog_exec(PyObject *module)
ADD_INT_MACRO(module, LOG_AUTHPRIV);
#endif
#ifdef LOG_FTP
ADD_INT_MACRO(module, LOG_FTP);
#endif
#ifdef LOG_NETINFO
ADD_INT_MACRO(module, LOG_NETINFO);
#endif
#ifdef LOG_REMOTEAUTH
ADD_INT_MACRO(module, LOG_REMOTEAUTH);
#endif
#ifdef LOG_INSTALL
ADD_INT_MACRO(module, LOG_INSTALL);
#endif
#ifdef LOG_RAS
ADD_INT_MACRO(module, LOG_RAS);
#endif
#ifdef LOG_LAUNCHD
ADD_INT_MACRO(module, LOG_LAUNCHD);
#endif
return 0;
}