Hi Ceki,

Adding a `result.triggeringPolicy.start()` just before `result.start() `
solve the problem.

Thanks,
Paolo


On Sun, Feb 14, 2016 at 3:51 PM, Ceki Gulcu <[email protected]> wrote:

>
> Hi Paolo,
>
>
> RollingAppender is stricter and will refuse to start if it's assigned
> TriggeringPolicy is not started, hence the message:
>
> 12:09:32,196 |-WARN in
> ch.qos.logback.core.rolling.RollingFileAppender[null] - TriggeringPolicy
> has not started. RollingFileAppender will not start
>
> You need to start the RollOnStartupPolicy.
>
> --
> Ceki
>
> On 2/14/2016 11:37, Paolo Di Tommaso wrote:
>
>> Hi,
>>
>> After upgrading from Logback 1.1.3 to version 1.1.5 I've noticed that it
>> isn't creating the log file any more.
>>
>> I'm using a RollingFileAppender configured using a piece of code like
>> this:
>>
>>     RollingFileAppender result = logFileName ? new RollingFileAppender()
>>     : null
>>     result.file = logFileName
>>
>>     def rollingPolicy = new  FixedWindowRollingPolicy( )
>>     rollingPolicy.fileNamePattern = "${logFileName}.%i"
>>     rollingPolicy.setContext(loggerContext)
>>     rollingPolicy.setParent(result)
>>     rollingPolicy.setMinIndex(1)
>>     rollingPolicy.setMaxIndex(9)
>>     rollingPolicy.start()
>>
>>     result.rollingPolicy = rollingPolicy
>>     result.encoder = createEncoder()
>>     result.setContext(loggerContext)
>>     result.setTriggeringPolicy(new RollOnStartupPolicy())
>>     result.start()
>>
>>
>>
>> Something has changed that logic ?
>>
>>
>> Cheers,
>> Paolo
>>
>>
>>
>>
>> _______________________________________________
>> logback-user mailing list
>> [email protected]
>> http://mailman.qos.ch/mailman/listinfo/logback-user
>>
>> _______________________________________________
> logback-user mailing list
> [email protected]
> http://mailman.qos.ch/mailman/listinfo/logback-user
>
_______________________________________________
logback-user mailing list
[email protected]
http://mailman.qos.ch/mailman/listinfo/logback-user

Reply via email to