[logback-user] [newbie] Setting up a project

Alexandre Jaquet alexjaquet at gmail.com
Fri Mar 2 02:23:13 CET 2007


Here we are,

A working sample

<configuration debug="true">

   <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
     <layout class="ch.qos.logback.classic.PatternLayout">
       <Pattern>%-4relative [%thread] %-5level %class - %msg%n</Pattern>
     </layout>
   </appender>

   <logger name="org.accma.concentrator.services.bitran.BiTranService">
     <level value="debug" />
     <appender-ref ref="bitranlog" />
   </logger>

   <appender name="FILE"
class="ch.qos.logback.core.rolling.RollingFileAppender">
     <File>c:\test_perf.log</File>
     <rollingPolicy
class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
       <FileNamePattern>soccs_%d{yyyy-MM}.log.gz</FileNamePattern>
     </rollingPolicy>

     <layout class="ch.qos.logback.classic.PatternLayout">
       <Pattern>%-4relative [%thread] %-5level %class - %msg%n</Pattern>
     </layout>
   </appender>

   <logger name="org.accma.concentrator.services.soccs.SOCCSService">
     <level value="debug" />
     <appender-ref ref="FILE" />
   </logger>

   <root>
     <level value="debug" />
     <appender-ref ref="STDOUT" />
     <appender-ref ref="FILE" />
   </root>

</configuration>


Alexandre Jaquet wrote:
> 
> By doing the solution explain here
> 
> http://www.nabble.com/Why-am-I-only-seeing-one-log-generated--tf3024278.html
> 
> the file is created but nothing was written into the file :/
> 
> still doing some search.
> 
> 
> 
> Alexandre Jaquet wrote:
>> 
>> Hi,
>> 
>> I'm new to logback and I'm trying to setting up a test project, who will 
>> use it.
>> When I used log4j I simply added a file log4.properties on my src root 
>> and define some paramaters. My question is
>> how to do the same, and wich paramaters I've to set.
>> 
>> Thanks for your support.
>> 
>> Regards.
>> 
>> Alexandre Jaquet
>> _______________________________________________
>> Logback-user mailing list
>> Logback-user at qos.ch
>> http://qos.ch/mailman/listinfo/logback-user
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-newbie--Setting-up-a-project-tf3330855.html#a9262334
Sent from the Logback User mailing list archive at Nabble.com.




More information about the Logback-user mailing list