I am trying to print some messages in syslog using the Pyslog syslog logger. A simple logger as described in How to set up logging for 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 try to print a very long message like my_logger.debug('<<4000 chars>>') , it only prints the first 2046 characters. Is there such a known limit in Python?
From what I could compile, Python supports very large string input and all arguments are passed as a reference, so there should be no problem handling such large input. Any thoughts?
source share