Duplicate logs are created

Duplicate logs are created

book

Article ID: KB0079220

calendar_today

Updated On:

Products Versions
TIBCO Streaming 10.x

Description

I have a custom logback configuration that defines a custom output file location and rolling size for the console output of my StreamBase 10 application.  I have followed the instructions in the Help under Home > StreamBase Admin Guide > StreamBase Logging > Using StreamBase Logging > (sub-heading) Custom Configuration for Logback Logging:

https://docs.tibco.com/pub/str/10.4.1/doc/html/admin/logging.html

The result is that 2 sets of console logs are produced:  one set residing in the location I specify in my custom logback.xml configuration, and another set residing in the 'logs' sub-folder in the node directory.  I only want one set of logs sent to the location I specified in my custom logback.xml.

Issue/Introduction

duplicate logs are created

Resolution

There is a defect that causes duplicate sets of logs to be created in releases up to 10.4.0.  In these releases, the workaround is to specify the file name in the log appender fully, using the built-in logback substitution variable com.tibco.ep.dtm.logging.logDirectory to get the full path of the directory. For example:
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>${com.tibco.ep.dtm.logging.logDirectory}/mylog.log</file>
<encoder>
<pattern>%-5level: %msg%n</pattern>
</encoder>
</appender>