Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-1450

Logback leaving .tmp files with multiple instances in Jboss with springBoot

    XMLWordPrintable

Details

    Description

      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>

      Attachments

        Activity

          People

            logback-dev Logback dev list
            yh061 Rishy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: