[logback-user] Log file ot created

Paolo Di Tommaso paolo.ditommaso at gmail.com
Sun Feb 14 11:10:15 UTC 2016


Hi Ceki,

It prints the following:

12:09:31,787 |-INFO in ch.qos.logback.classic.LoggerContext[default] -
Could NOT find resource [logback.groovy]
12:09:31,787 |-INFO in ch.qos.logback.classic.LoggerContext[default] -
Could NOT find resource [logback-test.xml]
12:09:31,787 |-INFO in ch.qos.logback.classic.LoggerContext[default] -
Could NOT find resource [logback.xml]
12:09:31,789 |-INFO in ch.qos.logback.classic.LoggerContext[default] -
Setting up default configuration.
12:09:32,192 |-INFO in
ch.qos.logback.core.rolling.FixedWindowRollingPolicy at 2cd76f31 - No
compression will be used
12:09:32,196 |-WARN in
ch.qos.logback.core.rolling.RollingFileAppender[null] - TriggeringPolicy
has not started. RollingFileAppender will not start


On Sun, Feb 14, 2016 at 12:06 PM, Ceki Gulcu <ceki at qos.ch> wrote:

> Hi Paolo,
>
> The logic should stay the same. What do status messages say? See
>
>   http://logback.qos.ch/manual/configuration.html#statusListener
>
> or add the following after result.start()
>
> LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
> StatusPrinter.print(lc);
>
> --
> 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
> logback-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/logback-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20160214/095538b2/attachment.html>


More information about the logback-user mailing list