cancel
Showing results for 
Search instead for 
Did you mean: 

Log stacktrace error in multiple line with timestamp

06-28-2017 10:24 PM
1131 views 2 comments
0 Likes
SAP Managed Tags
Subscribe

In my application, all stacktrace error are showing as multiple lines with ERROR level, but each line has prefix as timestamp, for example here

So it's hard to trace the error from splunk or logstash, I don't know which configuration from log4j2 supporting for this layout.

0 Likes

Accepted Solutions (0)

Answers (2)

Answers (2)

andyfletcher
Active Contributor
0 Likes

It's the Tanuki wrapper that is adding the timestamp. I think it just captures all output from stdout and stderr and logs it but doesn't have the concept of multi line messages so each line gets its own timestamp.

I ended up configuring log4j to log to a separate file with a pattern that I could control and sent that to our log aggregation.

There are also some messages that come through java util logging and you can send these to a file by editing bin/platform/tomcat/bin/jdk_logging.properties

e.g. the message marked SEVERE: in your screenshot is a JUL message, the one marked ERROR is a log4j message

You miss messages that come directly from the wrapper, specifically server startup and shutdown but it's much easier to parse multi line messages.

VinayKumarS
Active Contributor
0 Likes

If you are using splunk then you can change the view settings to hide the log level server deails and so on... you can check the filters... in splunk