[issue11907] SysLogHandler can't send long messages

2015-11-06 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: This issue will stay closed, BUT I propose you to create a new issue with a new title: Feature: Support message over 1024 bytes for the SysLogHandler. and propose a patch for this feature. -- nosy: +matrixise ___ P

[issue11907] SysLogHandler can't send long messages

2015-11-06 Thread R. David Murray
R. David Murray added the comment: Writing your own handler is what Vinay recommended. Is it even possible to determine the maximum message size? If we can't do that reliably, then the best we can do is recommend writing your own exception handler using local knowledge. If it can be determin

[issue11907] SysLogHandler can't send long messages

2015-11-06 Thread Harsh Patel
Harsh Patel added the comment: I know this has been closed as "Not a bug" but it would have been convenient if the message was broken down into multiple packets and transmitted, should it exceed the packet limit. Raising an exception [Errno 40 or Errno 90] or silently ignoring the packet (by

[issue11907] SysLogHandler can't send long messages

2014-11-10 Thread Domen Kožar
Domen Kožar added the comment: Note: same bug is relevant to DatagramHandler since it uses UDP transport. -- nosy: +iElectric ___ Python tracker ___ _

[issue11907] SysLogHandler can't send long messages

2014-06-06 Thread Garrett Cooper
Garrett Cooper added the comment: Please note that when I said "the code" I was looking at python 3.3 on OSX (compiled with MacPorts): $ python3.3 Python 3.3.5 (default, Mar 11 2014, 15:08:59) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin Type "help", "copyright", "credits"

[issue11907] SysLogHandler can't send long messages

2014-06-06 Thread Garrett Cooper
Garrett Cooper added the comment: The code doesn't appear to be conforming to RFC-3164 or RFC-5424: (From RFC-3164): 4.1 syslog Message Parts The full format of a syslog message seen on the wire has three discernable parts. The first part is called the PRI, the second part is the HEA

[issue11907] SysLogHandler can't send long messages

2011-04-26 Thread Vinay Sajip
Vinay Sajip added the comment: Also: http://plumberjack.blogspot.com/2010/09/using-logging-with-multiprocessing.html -- ___ Python tracker ___ _

[issue11907] SysLogHandler can't send long messages

2011-04-26 Thread Vinay Sajip
Vinay Sajip added the comment: For other options you might like to consider, see: http://plumberjack.blogspot.com/2010/09/improved-queuehandler-queuelistener.html which refers to QueueHandler and QueueListener classes. These were added in 3.2 but are available for Python 2.x: http://code.goo

[issue11907] SysLogHandler can't send long messages

2011-04-23 Thread Lukáš Lalinský
Lukáš Lalinský added the comment: It will be called only from the handler, so I think it should be fine. The reason why I started using syslog was that I need to log into a single file from multiple processes, but it seems to be showing up as too much trouble. --

[issue11907] SysLogHandler can't send long messages

2011-04-23 Thread Vinay Sajip
Vinay Sajip added the comment: > I'll write a LocalSysLogHandler for me that uses the syslog module. Sure, but bear in mind that on some Linux systems at least, the syslog module has thread safety issues because the underlying C APIs are not thread-safe. (I'm not sure of the situation on Fr

[issue11907] SysLogHandler can't send long messages

2011-04-23 Thread Vinay Sajip
Vinay Sajip added the comment: I've managed to get access to a FreeBSD system and done some investigation. The system is working as designed, and the error message is being printed by the handleError() method of the handler. To handle the exception differently, you either set logging.raiseExc

[issue11907] SysLogHandler can't send long messages

2011-04-23 Thread Lukáš Lalinský
Lukáš Lalinský added the comment: It seems that I was wrong, the exception is indeed not propagated to the application, but handled by the handleError() method. I was confused by seeing the traceback in my uWSGI log file. I'm unable to find a way to determine the maximum allowed syslog messag

[issue11907] SysLogHandler can't send long messages

2011-04-23 Thread Vinay Sajip
Vinay Sajip added the comment: The entire part of emit() which sends to the socket is wrapped in an except: which should catch all except KeyboardInterrupt and SystemExit. The except clause calls the handleError method of the handler. See http://hg.python.org/cpython/file/fa277cbd66bb/Lib/log

[issue11907] SysLogHandler can't send long messages

2011-04-23 Thread Vinay Sajip
Changes by Vinay Sajip : -- assignee: -> vinay.sajip nosy: +vinay.sajip versions: +Python 3.2, Python 3.3 ___ Python tracker ___ ___

[issue11907] SysLogHandler can't send long messages

2011-04-22 Thread Lukáš Lalinský
New submission from Lukáš Lalinský : It seems that logging.handlers.SysLogHandler can't handle messages that can't be passed atomically via the socket. I'm not sure what is the right behavior (the syslog() function truncates the message), but I think it shouldn't propagate the exception to the