[issue37331] logging.handlers.DatagramHandler sends bad data to socketserver.DatagramRequestHandler

Yoong Hor Meng report at bugs.python.org
Tue Jun 18 23:56:13 EDT 2019


Yoong Hor Meng <yoonghm at gmail.com> added the comment:

I did some checks, I discovered the following:

logging.handlers.DatagramHandler() sends data in the following format:
1. message length
2. message itself which consists of 
   a. Creation time in ASCII format
   b. Creation time in seconds, ms
   c. Filename, line no
   d. Message level
   e. Message
   f. Logger name
   etc.

Item 1. is packed using struct.pack(">L")
Item 2. is packed using pickle

The message format is not mentioned in any of the standard Python document.  Also it may not be compatible with third-party syslog message library or generator.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37331>
_______________________________________


More information about the Python-bugs-list mailing list