[logback-user] Multiple files and other issues

Marco Bresciani m.bresciani at email.it
Fri Mar 6 23:40:40 CET 2009


Thanks,
  today I've done a brief test with this file and it seems that the special
package log file is not filled while the root one also contains special
packages logs.

I'll check better on monday.

Thanks,

Marco

Ceki Gulcu ha scritto:
> 
> See  http://logback.qos.ch/manual/configuration.html#syntax
> 
> This configuration file below separates logs for "special.package.one"
> 
> 
> <configuration debug="true">
> 
>   <appender name="ROOT" class="ch.qos.logback.core.FileAppender" >
>     <file>myapp.log</file>
>     <append>false</append>
>     <layout>
>       <pattern>%d{yyyy-MM-dd HH:mm:ss},%p,%c,%F,%C{1} %m%n</pattern>
>     </layout>
>   </appender>
> 
>   <appender name="PACKAGE1" class="ch.qos.logback.core.FileAppender" >
>     <file>specialone.log</file>
>     <append>false</append>
>     <layout>
>       <pattern>%d{yyyy-MM-dd HH:mm:ss},%p,%c,%F,%C{1} %m%n</pattern>
>     </layout>
>   </appender>
> 
> 
>   <logger name="special.package.one" additivity="false">
>     <appender-ref ref="PACKAGE1"/>
>   </logger>
> 
>   <root level="DEBUG">
>     <appender-ref ref="ROOT"/>
>   </root>
> </configuration>
> 
> HTH,
> 
> m.bresciani at email.it wrote:
>> Thanks,
>>   I've given a very brief look and seems interesting and anyway useful.
>>
>> So, except for MDC, now I have to filter the packages. These go to
>> different files, right?
>>
>> i.e.:
>>
>> whole application (or unspecified packages) - myapp.log
>> special.package.one - specialone.log
>> special.package.two - specialtwo.log
>> sub-app or external load - anotherlog.log
>>
>> and so on.
>>
>> Thanks,
>>
>> Marco
>>
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5248 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://qos.ch/pipermail/logback-user/attachments/20090306/57c98366/attachment.bin>


More information about the Logback-user mailing list