Details
-
Bug
-
Resolution: Unresolved
-
Blocker
-
None
-
1.0.13
-
None
Description
I am configuring logback programmatically with a FixedWindowRollingPolicy. I am trying to set the fileNamePattern with something like
FixedWindowRollingPolicy rolling = new FixedWindowRollingPolicy(); rolling.setParent(appender); rolling.setMaxIndex(1); rolling.setMaxIndex(5); rolling.setFileNamePattern(file + ".%i.zip"); rolling.start();
but I always get the following exception
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.cinchapi.concourse.server.ConcourseServer.<clinit>(ConcourseServer.java:162)
Caused by: java.lang.IllegalStateException: FileNamePattern [log/performance.log.%1zip] does not contain a valid IntegerToken
at ch.qos.logback.core.rolling.FixedWindowRollingPolicy.start(FixedWindowRollingPolicy.java:93)
at org.cinchapi.concourse.server.util.Loggers.getLogger(Loggers.java:90)
at org.cinchapi.concourse.server.util.Loggers.<clinit>(Loggers.java:120)
... 1 more
The same behaviour happens even if I give it an explicit string (without a variable filename). It seems that the '%i' is not being parsed correctly...