[logback-user] rolling in logback-android

Tony Trinh tony19 at gmail.com
Fri Sep 23 06:04:58 CEST 2011


Ok, it's fixed now.

-Tony


On Wed, Sep 21, 2011 at 10:05 PM, Tony Trinh <tony19 at gmail.com> wrote:

> Hi Peter/Ceki,
>
> Android doesn't support java.beans.Introspector, so I had to roll my own.
>
> I managed to reproduce the problem. Changing the tag to
> "RollingPolicy" unfortunately did not help. The logcat output is:
>
>
> I/System.out(  855): 22:03:12,832 |-INFO in
> ch.qos.logback.core.joran.action.AppenderAction - About to instantiate
> appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
> I/System.out(  855): 22:03:12,834 |-INFO in
> ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FILE]
> I/System.out(  855): 22:03:12,849 |-ERROR in
> ch.qos.logback.core.joran.spi.Interpreter at 5:8 - no applicable action for
> [rollingPolicy], current pattern is
> [[configuration][appender][rollingPolicy]]
> I/System.out(  855): 22:03:12,857 |-ERROR in
> ch.qos.logback.core.joran.spi.Interpreter at 6:12 - no applicable action for
> [FileNamePattern], current pattern is
> [[configuration][appender][rollingPolicy][FileNamePattern]]
> I/System.out(  855): 22:03:12,864 |-INFO in
> ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default
> type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder]
> property
> I/System.out(  855): 22:03:12,877 |-WARN in
> ch.qos.logback.core.rolling.RollingFileAppender[FILE] - No TriggeringPolicy
> was set for the RollingFileAppender named FILE
> I/System.out(  855): 22:03:12,877 |-WARN in
> ch.qos.logback.core.rolling.RollingFileAppender[FILE] - For more
> information, please visit http://logback.qos.ch/codes.html#rfa_no_tp
> I/System.out(  855): 22:03:12,877 |-INFO in
> ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT
> logger to DEBUG
> I/System.out(  855): 22:03:12,878 |-INFO in
> ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender
> named [FILE] to Logger[ROOT]
> I/System.out(  855): 22:03:12,878 |-INFO in
> ch.qos.logback.classic.joran.action.ConfigurationAction - End of
> configuration.
> I/System.out(  855): 22:03:12,652 |-INFO in
> ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource
> [logback.groovy]
> I/System.out(  855): 22:03:12,652 |-INFO in
> ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource
> [logback-test.xml]
> I/System.out(  855): 22:03:12,652 |-INFO in
> ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource
> [logback.xml]
> I/System.out(  855): 22:03:12,662 |-INFO in
> ch.qos.logback.classic.LoggerContext[default] - Setting up default
> configuration.
> I/System.out(  855): 22:03:12,832 |-INFO in
> ch.qos.logback.core.joran.action.AppenderAction - About to instantiate
> appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
> I/System.out(  855): 22:03:12,834 |-INFO in
> ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FILE]
> I/System.out(  855): 22:03:12,849 |-ERROR in
> ch.qos.logback.core.joran.spi.Interpreter at 5:8 - no applicable action for
> [rollingPolicy], current pattern is
> [[configuration][appender][rollingPolicy]]
> I/System.out(  855): 22:03:12,857 |-ERROR in
> ch.qos.logback.core.joran.spi.Interpreter at 6:12 - no applicable action for
> [FileNamePattern], current pattern is
> [[configuration][appender][rollingPolicy][FileNamePattern]]
> I/System.out(  855): 22:03:12,864 |-INFO in
> ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default
> type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder]
> property
> I/System.out(  855): 22:03:12,877 |-WARN in
> ch.qos.logback.core.rolling.RollingFileAppender[FILE] - No TriggeringPolicy
> was set for the RollingFileAppender named FILE
> I/System.out(  855): 22:03:12,877 |-WARN in
> ch.qos.logback.core.rolling.RollingFileAppender[FILE] - For more
> information, please visit http://logback.qos.ch/codes.html#rfa_no_tp
> I/System.out(  855): 22:03:12,877 |-INFO in
> ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT
> logger to DEBUG
> I/System.out(  855): 22:03:12,878 |-INFO in
> ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender
> named [FILE] to Logger[ROOT]
> I/System.out(  855): 22:03:12,878 |-INFO in
> ch.qos.logback.classic.joran.action.ConfigurationAction - End of
> configuration.
> I/System.out(  855): 22:03:12,920 |-INFO in
> ch.qos.logback.classic.joran.JoranConfigurator at 4053ad60 - Registering
> current configuration as safe fallback point
>
>
>
> I will look into the problem this weekend when I get a chance.
>
> Thanks,
> Tony
>
>
> On Wed, Sep 21, 2011 at 6:47 PM, Ceki Gülcü <ceki at qos.ch> wrote:
>
>> Hi Peter,
>>
>> After studying logback-android code, in particular the PropertySetter
>> class, it looks like Anthony has written his own Introspector class instead
>> of using java.beans.Instrospector. I am guessing that properties are not
>> being detected correctly by Anthony's Instrospector.
>>
>> I suggest you report this problem to Anthony. As a temporary measure,
>> writing <RollingPolicy> instead of <rollingPolicy> should/may solve the
>> problem.
>>
>> HTH,
>>
>> --
>> Ceki
>> http://twitter.com/ceki
>>
>> On 21/09/2011 3:17 AM, Peter Chmiel wrote:
>>
>>> Hi,
>>>
>>> Does logback-android support rolling?
>>>
>>> When I try using the configuration file below in an android app I get an
>>> error - No applicable action for [rollingPolicy]. But the same config
>>> works in a java project that uses logback.
>>>
>>> Thanks,
>>> Pete
>>>
>>> <configuration>
>>> <appender
>>> name="FILE"class="ch.qos.**logback.core.rolling.**RollingFileAppender">
>>>
>>> <rollingPolicy class="ch.qos.logback.core.**rolling.**
>>> TimeBasedRollingPolicy">
>>> <FileNamePattern>logFile.%d{**yyyy/MM/dd}.log</**FileNamePattern>
>>> </rollingPolicy>
>>>
>>> <layout class="ch.qos.logback.classic.**PatternLayout">
>>> <Pattern>%-4relative [%thread] %-5level %logger{35} - %msg%n</Pattern>
>>> </layout>
>>> </appender>
>>>
>>> <root level="debug">
>>> <appender-ref ref="FILE" />
>>> </root>
>>> </configuration>
>>>
>>>  ______________________________**_________________
>> Logback-user mailing list
>> Logback-user at qos.ch
>> http://qos.ch/mailman/**listinfo/logback-user<http://qos.ch/mailman/listinfo/logback-user>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://qos.ch/pipermail/logback-user/attachments/20110923/09d57c0b/attachment-0001.html>


More information about the Logback-user mailing list