cpython: 6baa90fa2b6d (original) (raw)

Mercurial > cpython

changeset 71015:6baa90fa2b6d

Closes #12419: Added ident to SysLogHandler. [#12419]

Vinay Sajip <vinay_sajip@yahoo.co.uk>
date Mon, 27 Jun 2011 15:40:06 +0100
parents 328fb2bbcd56
children 66a14844e146
files Doc/library/logging.handlers.rst Lib/logging/handlers.py Lib/test/test_logging.py
diffstat 3 files changed, 17 insertions(+), 0 deletions(-)[+] [-] Doc/library/logging.handlers.rst 9 Lib/logging/handlers.py 3 Lib/test/test_logging.py 5

line wrap: on

line diff

--- a/Doc/library/logging.handlers.rst +++ b/Doc/library/logging.handlers.rst @@ -452,6 +452,15 @@ supports sending logging messages to a r behaviour) but can be set to False on a SysLogHandler instance in order for that instance to not append the NUL terminator.

+ .. method:: encodePriority(facility, priority) Encodes the facility and priority into an integer. You can pass in strings

--- a/Lib/logging/handlers.py +++ b/Lib/logging/handlers.py @@ -769,6 +769,7 @@ class SysLogHandler(logging.Handler): """ return self.priority_map.get(levelName, "warning")

--- a/Lib/test/test_logging.py +++ b/Lib/test/test_logging.py @@ -1482,6 +1482,11 @@ class SysLogHandlerTest(BaseTest): logger.error("sp\xe4m") self.handled.wait() self.assertEqual(self.log_output, b'<11>\xef\xbb\xbfsp\xc3\xa4m')

@unittest.skipUnless(threading, 'Threading required for this test.')