[logback-dev] [JIRA] (LOGBACK-1450) Logback leaving .tmp files with multiple instances in Jboss with springBoot

QOS.CH (JIRA) noreply-jira at qos.ch
Tue Jan 15 06:52:00 CET 2019


Rishy created LOGBACK-1450:
------------------------------

             Summary: Logback leaving .tmp files with multiple instances in Jboss with springBoot
                 Key: LOGBACK-1450
                 URL: https://jira.qos.ch/browse/LOGBACK-1450
             Project: logback
          Issue Type: Task
          Components: logback-classic, logback-core
    Affects Versions: 1.1.11
         Environment: In linux with Jboss as an application server with SpringBoot (1.5.10) and java 1.8
            Reporter: Rishy
            Assignee: Logback dev list
            Priority: Blocker


We are deploying the application with multiple instances in JBoss. We log back with version 1.1.11 and spring-boot 1.5.10. When log back is trying to append the log file and rolling back as a .zip file it's leaving .tmp files. Below is the scenario 

When the application is running in three instances, it's appending only one instance logs into the zip leaving other two instances as .tmp files, which actually should be appended under the same zip file. This is a blocker in our production, with this behavior we are unable to trace out the issue.

Below is the Logback.xml: 

<configuration>
<property resource="bootstrap.yml" />
    <springProperty name="appName" source="spring.application.name"/>
    <springProperty name="loglevel" source="logging.level.com.some.package"/>
    
    <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> 
         <encoder> 
             <pattern>%d{ISO8601} %-5p [%c{3}] [%t] %m%n</pattern> 
         </encoder> 
     </appender> 
<appender name ="APPLICATION" class="ch.qos.logback.core.rolling.RollingFileAppender"> 
         <file>/appllogs/spp/${appName}.log</file> 
         <rollingPolicy 
             class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> 
             <fileNamePattern>/appllogs/backup/${appName}/%d{yyyy-MM-dd}%i.log.zip</fileNamePattern> 
             <maxHistory>7</maxHistory>
             <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
                 <maxFileSize>500MB</maxFileSize>
             </timeBasedFileNamingAndTriggeringPolicy>
             <totalSizeCap>1GB</totalSizeCap>
         </rollingPolicy> 

         <encoder> 
             <pattern>%d %-5p %m%n</pattern> 
         </encoder> 
     </appender> 

    
     <logger name="com.some.package" level="${loglevel}" additivity="false">
          <appender-ref ref="CONSOLE" />
        <appender-ref ref="APPLICATION"/>
    </logger>

    <root level="${loglevel}" >
        <appender-ref ref="CONSOLE" />
        <appender-ref ref="APPLICATION"/>
    </root>
</configuration>



--
This message was sent by Atlassian JIRA
(v7.3.1#73012)


More information about the logback-dev mailing list