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

RollingFileAppender does not roll the files in SimpleSocketServer

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 0.9.15
    • Fix Version/s: None
    • Component/s: logback-classic
    • Labels:
      None

      Description

      Hello Logback team,

      I use the RollingFileAppender in a SimpleSocketServer.
      The Messages are correctly written to the files but the files are not rolled at all.
      If I use the same appender config directly in my applications locally, it rolls the files as expected.
      The appender is configures as followed:

      <appender name="PAYLOAD_SIFT" class="ch.qos.logback.classic.sift.SiftingAppender">
      <discriminator class="com.swisscom.allip.logback.ContextBasedDiscriminator">
      <DefaultValue>unknown</DefaultValue>
      </discriminator>
      <sift>
      <appender name="FILE-PAYLOAD-$

      {contextName}" class="ch.qos.logback.core.rolling.RollingFileAppender">
      <File>${LOG_DIR}/payload-${contextName}

      .log</File>
      <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
      <!-- Rollover at midnight. Put log as uncompressed file to archive. -->
      <FileNamePattern>$

      {LOG_DIR}

      /archive/payload-$

      {contextName}

      _%d

      {yyyy-MM-dd}

      .log
      </FileNamePattern>
      <!-- Keep 5 days worth of history -->
      <MaxHistory>$

      {MAX_HISTORY_DAYS}

      </MaxHistory>
      </rollingPolicy>

      <layout class="ch.qos.logback.classic.PatternLayout">
      <Pattern>%d

      {HH:mm:ss.SSS}

      refId: %mdc

      {refId}

      - %msg%n%xEx

      {full}

      </Pattern>
      </layout>
      </appender>
      </sift>
      </appender>

      Can you please have a look at this issue.

      Thank you in advance,
      Rick

        Attachments

          Activity

            People

            • Assignee:
              logback-dev Logback dev list
              Reporter:
              rick Rick Janda
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: