On Wed, 7 Sep 2011, Sergey Pilypenko wrote:
Hi! I trying to make logging from my python scripts to loggly (loggly.com)
via rsyslog tcp forwarding. Rsyslog receiving log message from unix log
socket and sends it to loggly via tcp. The problem is when my python scripts
generate exception and send stacktrace to rsyslog. Rsyslog replace all
spectial characters from trace and I see it at loggly like one ugly row.
When I use "$EscapeControlCharactersOnReceive off" directive rsyslog split
trace to separate messages and add for each one date, host, etc. Then I see
that trace like set of separate messages on loggly. So what I can do to see
normal traces on loggly service?
unfortunantly you need to choose one or the other.
standard syslog says that each line sent to syslog is a separate log (the
behavior you see in the second case), a newline is not a valid character
inside a message.
rsyslog has the default of replacing control characters in a single entry
that are sent to it with escaped representations of those characters. This
makes sure that everything upstream of you treats the log message as a
single entry, but it makes it look ugly as you are seeing in the first
case.
remember that the #nnn represent specific characters, so you can run the
log entry through sed to replace #011 with a tab, etc.
David Lang
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com