swillis at compete
May 25, 2012, 7:20 AM
Post #2 of 5
Re: Need Help .... Exception traces are missed out!!
[In reply to]
I've been dealing with similar issues in log4j for a few weeks now. I'm not sure if it's exactly the same as yours, but I'm using the builtin UDP based SyslogAppender in log4j 1.2.15. The problem is that the SyslogAppender in log4j treats stack traces specially. After the main message has been formatted through the layout formatter, each line of the stack trace is sent as a separate log message with just facility/priority timestamp and hostname. It doesn't format these lines, so anything you were depending on being there from your conversion pattern (like the appname/tag) for filtering won't be there for the stack trace lines.
It looks like you're actually writing out the stack trace as part of the main message since you have "%throwable" in your conversion pattern. It's probably related to how either log4j or rsyslog is treating the new lines in your stack trace. Historically, any new line would separate log messages and they'd be treated as separate messages. Check /var/log/messages for these stack trace lines, then see if there's some way you can write out the stacktrace without new lines.
> -----Original Message-----
> From: rsyslog-bounces [at] lists [mailto:rsyslog-
> bounces [at] lists] On Behalf Of Sanjeev Reddy
> Sent: Friday, May 25, 2012 8:16 AM
> To: rsyslog [at] lists
> Subject: [rsyslog] Need Help .... Exception traces are missed out!!
> Hello Everyone,
> I'm facing an issue using rsyslog with log4j (SysLog4jAppender) and
> posted that on the forum. Can someone help me out on this.
> Thank you for your time !!
> rsyslog mailing list
> What's up with rsyslog? Follow https://twitter.com/rgerhards
rsyslog mailing list
What's up with rsyslog? Follow https://twitter.com/rgerhards