I can confirm this too..

In fact, I logged a bug earlier this month about it:

http://bugzilla.adiscon.com/show_bug.cgi?id=295

includes the crappy fix we had to do in order to get it to work.
(padding out the front of the log message)



On Tue, Dec 20, 2011 at 9:16 AM, Scott Moser <[email protected]> wrote:
> Hi,
>
> I have to apologize in advance for my general ignorance of syslog or
> rsyslog specifically.
>
> 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
> _______________________________________________
> rsyslog mailing list
> http://lists.adiscon.net/mailman/listinfo/rsyslog
> http://www.rsyslog.com/professional-services/
>



-- 
// Mike Forbes
GPG: BFC7 3F32 2CCF D91F 53E1  DF88 1578 B2E4 1399 6844
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/

Reply via email to