Launchpad has imported 2 comments from the remote bug at http://bugzilla.adiscon.com/show_bug.cgi?id=295.
If you reply to an imported comment from within Launchpad, your comment will be sent to the remote bug automatically. Read more about Launchpad's inter-bugtracker facilities at https://help.launchpad.net/InterBugTracking. ------------------------------------------------------------------------ On 2011-12-05T20:27:22+00:00 Mike-forbes+bugzilla wrote: Rsyslog seems to be stripping log messages for python logging[1] I've tested this in rsyslog 5.8.6. It was working fine in 5.8.5 Example: in my python log file ini: [formatter_detailed] format=appname [%(process)d]: %(name)s %(module)s(%(lineno)d): %(message)s which gives: Dec 6 09:22:06 hostname name module(230): message If I add some spacing to my formatting: [formatter_detailed] format=xxxxxxxxxxxxxxx appname[%(process)d]: %(name)s %(module)s(%(lineno)d): %(message)s I get what I'd expect to see (and what was working previously) Dec 6 09:24:02 hostname appname[14019]: name module(230): message Ubuntu Lucid; rsyslogd 5.8.6, compiled with: FEATURE_REGEXP: Yes FEATURE_LARGEFILE: No GSSAPI Kerberos 5 support: Yes FEATURE_DEBUG (debug build, slow code): No 32bit Atomic operations supported: Yes 64bit Atomic operations supported: Yes Runtime Instrumentation (slow code): No [1] http://docs.python.org/library/logging.html#logrecord-attributes Reply at: https://bugs.launchpad.net/rsyslog/+bug/905419/comments/0 ------------------------------------------------------------------------ On 2011-12-19T20:34:38+00:00 Mike-forbes+bugzilla wrote: See also; Scott Moser on the rsyslog mailing list wrote: I'm using python logging [1] to write to syslog in cloud-init [2]. I've noticed a problem in the development version of ubuntu that has rsyslog 5.8.6, that does not exist in the Ubuntu 11.10 release that has rsyslog 5.8.1 [3]. The issue can be seen by running the attached test case. If you run it like: $ ./python-logging-syslog.py foobar You'll see output to the console of: [MYTAG] python-logging-syslog.py[DEBUG]: foobar and in /var/log/syslog, you see a message like: Dec 19 19:01:21 server-3418 ogging-syslog.py[DEBUG]: foobar strace led me to see that the python-logging messages do not have a TIMESTAMP field directly after the PRIVAL. As a result, 16 characters are getting chopped from the incoming message. It seems that rsyslog was previously more forgiving there and allow messages without a TIMESTAMP. The Ubuntu and Debian default rsyslog.conf has $ModLoad imuxsock And I'm writing to syslog in python through /dev/log. I've not tested, but it looks to me like this behavior might have changed it would seem that commit 54cee2ce69c5bbd96aa51ac8636f4b029e2ceb7 [4] might be the source of the change. Is it intended that messages require the TIMESTAMP field now? -- [1] http://docs.python.org/library/logging.html [2] https://launchpad.net/cloud-init [3] http://pad.lv/905419 [4] http://git.adiscon.com/?p=rsyslog.git;a=commit;h=54cee2ce69c5bbd96aa51ac8636f4b029e2ceb75 Reply at: https://bugs.launchpad.net/rsyslog/+bug/905419/comments/8 ** Changed in: rsyslog Status: Unknown => Confirmed ** Changed in: rsyslog Importance: Unknown => High -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/905419 Title: messages to rsyslog without timestamp lose 16 chars To manage notifications about this bug go to: https://bugs.launchpad.net/rsyslog/+bug/905419/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
