I'm trying to print some messages to syslog using Python's syslog logger. Simple logger as described in "How to configure logging to syslog in python?":
import logging
import logging.handlers
my_logger = logging.getLogger('MyLogger')
my_logger.setLevel(logging.DEBUG)
handler = logging.handlers.SysLogHandler()
my_logger.addHandler(handler)
my_logger.debug('this is debug')
But when I'm trying to print a very long message like my_logger.debug('<<4000 chars>>')
, it is printing only first 2046 chars. Is there any such known limit in Python?
From what I could gather, Python supports a VERY big string input and all the arguments are passed as reference, so it should not be any problem in handling such large input. Any thoughts?