[logback-dev] [JIRA] (LOGBACK-1510) logback is opening multiple files at the same time for same appender.
QOS.CH (JIRA)
noreply-jira at qos.ch
Mon Mar 16 15:03:00 CET 2020
KARTHIKA RAGUPATHI created LOGBACK-1510:
-------------------------------------------
Summary: logback is opening multiple files at the same time for same appender.
Key: LOGBACK-1510
URL: https://jira.qos.ch/browse/LOGBACK-1510
Project: logback
Issue Type: Bug
Components: logback-core
Affects Versions: 1.0.11
Environment: OS : AIX machine
Application server : Weblogic server
Reporter: KARTHIKA RAGUPATHI
Assignee: Logback dev list
+*Issue:*+
I see multiple same log files opened for logging,
[root at cssapp2 rtc]# *lsof | grep rtc-connector.log*
java 2989 cbsuser 787w REG 0,19 5273861 *2923670* /IPmeas/cssapp2/rtc/*rtc-connector.log.3* (172.17.71.97:/ibm/logfs)
java 2989 cbsuser 815w REG 0,19 3822121 *483571* /IPmeas/cssapp2/rtc/*rtc-connector.log* (172.17.71.97:/ibm/logfs)
[root at cssapp2 rtc]#
The above *rtc-connector.log.3* is above 5 MB even though it is configured as <MaxFileSize>5MB</MaxFileSize>. Actually it is not released from writing and so the size keeps increasing.
*I have mentioned the current appender configuration below.*
*Kindly help to resolve it.*
+*Jars*:+
WEB-INF/lib/logback-ext-spring-0.1.1.jar
WEB-INF/lib/logback-classic-1.0.11.jar
WEB-INF/lib/logback-core-1.0.11.jar
*+Configuration:+*
*Issue is with* *rtc_file_appender. It is writing in more than one* *rtc-connector.log file.*****
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="30 seconds" debug="false" >
<contextName>rtc</contextName>
<newRule pattern="*/configuration/extendedJmxConfigurator" actionClass="com.comverse.api.framework.log.jmx.logback.ExtendedJMXConfigurationAction"/>
<extendedJmxConfigurator/>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<Pattern>%date | [%.-1level] | %logger | %X\{threadId} | %X\{username} | %X\{username} | %X\{uniqueClientId} | tid:%X\{transaction_id} | acc:%X\{account_id} | sub:%X\{subscriber_id} | ord:%X\{order_number} | soid:%X\{service_order_number} | %msg%n</Pattern>
</encoder>
</appender>
<appender name="rolling_file_appender" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!-- **** File name must match SAPILOGNAME value in Install.properties **** -->
<File>/IPmeas/$\{HOSTNAME}/rtc/SingleApi.log</File>
<Append>true</Append>
<encoder>
<Pattern>%date | [%.-1level] | %logger | %X\{threadId} | %X\{loggedUserName} | %X\{username} | %X\{uniqueClientId} | tid:%X\{transaction_id} | acc:%X\{account_id} | sub:%X\{subscriber_id} | ord:%X\{order_number} | soid:%X\{service_order_number} | %msg%n</Pattern>
</encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<maxIndex>50</maxIndex>
<FileNamePattern>/IPmeas/$\{HOSTNAME}/rtc/SingleAPI.log.%i</FileNamePattern>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<MaxFileSize>5MB</MaxFileSize>
</triggeringPolicy>
</appender>
<!-- CSS specific appenders -->
<appender name="*rtc_file_appender*" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>/IPmeas/$\{HOSTNAME}/rtc/*rtc-connector.log*</File>
<Append>true</Append>
<encoder>
<Pattern>%date | [%.-1level] | %logger | %X\{threadId} | %X\{loggedUserName} | %X\{username} | %X\{uniqueClientId} | tid:%X\{transaction_id} | acc:%X\{account_id} | sub:%X\{subscriber_id} | ord:%X\{order_number} | soid:%X\{service_order_number} | %msg%n</Pattern>
</encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
*<maxIndex>50</maxIndex>*
<FileNamePattern>/IPmeas/$\{HOSTNAME}/rtc/rtc-connector.log.%i</FileNamePattern>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
*<MaxFileSize>5MB</MaxFileSize>*
</triggeringPolicy>
</appender>
<appender name="async_file_appender" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>/IPmeas/$\{HOSTNAME}/async/async-connector.log</File>
<Append>true</Append>
<encoder>
<Pattern>%date | [%.-1level] | %logger | %X\{threadId} | %X\{loggedUserName} | %X\{username} | %X\{uniqueClientId} | tid:%X\{transaction_id} | acc:%X\{account_id} | sub:%X\{subscriber_id} | ord:%X\{order_number} | soid:%X\{service_order_number} | %msg%n</Pattern>
</encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<maxIndex>50</maxIndex>
<FileNamePattern>/IPmeas/$\{HOSTNAME}/async/async-connector.log.%i</FileNamePattern>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<MaxFileSize>5MB</MaxFileSize>
</triggeringPolicy>
</appender>
<logger name ="central.logger" level="debug">
<appender-ref ref="rtc_file_appender" />
</logger>
<root level="debug" />
--
This message was sent by Atlassian JIRA
(v7.3.1#73012)
More information about the logback-dev
mailing list