How to suppress unneeded stack-trace log output in TIBCO Streaming

How to suppress unneeded stack-trace log output in TIBCO Streaming

book

Article ID: KB0074539

calendar_today

Updated On:

Products Versions
TIBCO Streaming 10

Description

Some warnings or errors reported in the Streaming engine log include Java stack-traces which are not needed because the occasional problems are expected and only the first line is needed.

How can I prevent long stack-traces from cluttering the log and interfering with log monitoring tools?

Resolution

Suppress stack traces by modifying the log message pattern output to include '%ex{1}' as so:
<appender name="RootConsoleAppender" class="ch.qos.logback.core.ConsoleAppender">
    <encoder>
      <pattern>%d{yyyy-MM-dd-HH:mm:ss.SSS} [%-5level] %logger{35}%ex{1} - %msg%n</pattern>
    </encoder>
  </appender>
When a message would include a stack trace, this limits stack output to one line for each message. 

Additional Logback pattern options are documented here:
  http://logback.qos.ch/manual/layouts.html
 

Issue/Introduction

Logback configuration guidance