danielwegener / logback-kafka-appender

Logback appender for Apache Kafka
Apache License 2.0
644 stars 262 forks source link

Upgrade from 0.0.3 to 0.0.4 issue #22

Closed rubesMN closed 8 years ago

rubesMN commented 8 years ago

Without a change to my logback.xml file I get an IndexOutOfBoundsException after I upgrade from 0.0.3 to 0.0.4.

<appender name="logFileAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <file>logs/${myappName}.log</file>
    <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
        <!-- daily rollover -->
        <fileNamePattern>logs/${myappName}.%d{yyyy-MM-dd}.log.gz</fileNamePattern>
        <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
            <maxFileSize>22MB</maxFileSize>
        </timeBasedFileNamingAndTriggeringPolicy>
        <!-- keep 90 days' worth of history -->
        <maxHistory>90</maxHistory>
    </rollingPolicy>
    :

The error log:

17:35:47,015 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [logFileAppender] 17:35:47,066 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - Will use gz compression 17:35:47,068 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - Will use the pattern logs/myService.%d{yyyy-MM-dd}.log for the active file 17:35:47,071 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@369e8d51 - The date pattern is 'yyyy-MM-dd' from file name pattern 'logs/myService.%d{yyyy-MM-dd}.log.gz'. 17:35:47,071 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@369e8d51 - Roll-over at midnight. 17:35:47,074 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@369e8d51 - Setting initial period to Wed Nov 11 16:18:24 CST 2015 17:35:47,077 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@46:25 - RuntimeException in Action for tag [rollingPolicy] java.lang.IndexOutOfBoundsException: No group 1 at java.lang.IndexOutOfBoundsException: No group 1 at at java.util.regex.Matcher.group(Matcher.java:538) at at ch.qos.logback.core.rolling.helper.FileFilterUtil.extractCounter(FileFilterUtil.java:109) at at ch.qos.logback.core.rolling.helper.FileFilterUtil.findHighestCounter(FileFilterUtil.java:93) at at ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP.computeCurrentPeriodsHighestCounterValue(SizeAndTimeBasedFNATP.java:70) at at ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP.start(SizeAndTimeBasedFNATP.java:50) at at ch.qos.logback.core.rolling.TimeBasedRollingPolicy.start(TimeBasedRollingPolicy.java:90) at at ch.qos.logback.core.joran.action.NestedComplexPropertyIA.end(NestedComplexPropertyIA.java:167) at at ch.qos.logback.core.joran.spi.Interpreter.callEndAction(Interpreter.java:317)

danielwegener commented 8 years ago

@rubesMN Uhm - Sorry I do not see any involment of logback-kafka-appender in your configuration. Can you help me out (maybe just my tired eyes)?

danielwegener commented 8 years ago

@rubesMN does the problem still exist? can we close this issue?

danielwegener commented 8 years ago

I will close this issue for now. Feel free to reopen it if the problem still exists.