0

I am using a Rolling File Appender and it creates new log files after the file size exceeds 3MB. But it does not add some logs. When I try to perform operations on UI, it doesn't gets logged. I am new to Log-back and would be great if anybody can help?

<appender name="SiftingRolling" class="com.demo.eventlogger.SiftingAppender">
<discriminator>
    <key>id</key>
    <defaultValue>Common</defaultValue>
</discriminator>
<sift>
    <appender name="FILE-${id}"
            class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${dir}/log/service.log</file>
        <rollingPolicy
                class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
            <fileNamePattern>${dir}/log/service.%i.gz
            </fileNamePattern>
            <maxIndex>1</maxIndex>
        </rollingPolicy>
        <triggeringPolicy
                class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
            <maxFileSize>3MB</maxFileSize>
        </triggeringPolicy>
        <append>true</append>
        
    </appender>



   </sift>
  </appender>
3
  • What's the java code were missing loggin is?
    – LMC
    Commented Mar 14, 2022 at 17:30
  • Please, take some time to read how to create a minimal, reproducible example
    – LMC
    Commented Mar 14, 2022 at 17:35
  • Please provide enough code so others can better understand or reproduce the problem.
    – Community Bot
    Commented Mar 14, 2022 at 18:52

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.