I have several different django applications under apache on a Red Hat server. These applications use SysLogHandler for sending log messages to the local
rsyslog service. In order to pipe log messages from different django applications to different files, we are using
rsyslog tagging (based on
syslogtag). Here's what we have in
... $template myFormat,"%msg%\n" if $syslogfacility-text == 'local2' and $syslogtag == 'dev:' then /var/log/ap/dev/ws.log;myFormat if $syslogfacility-text == 'local2' and $syslogtag == 'rel:' then /var/log/ap/rel/ws.log;myFormat ...
Works this way: if the log message is
Hello World! is written to
Everything worked fine until yesterday. Our system was upgraded from 6.2 to 6.3. According to
rsyslog was updated from
After debugging a bit, I've found that
$syslogtag == 'dev:' condition doesn't work on the new
$syslogtag now eats a part of a message till the first space and contains
dev:Hello instead of just
Could you please point me what to do with it and how to make rsyslog parse the tag correctly? (Changing log message format that comes from django applications is not an option)
Let me know if you need any additional info. Thank you.