Project

General

Profile

Bug #2500 » logback.xml

Vincent MEMBRÉ, 2012-05-25 16:36

 

<!--
This is a sample logback configuration file. It aims to show some of
the possibilities available. To configure logback, the configuration
file has to be on the class path Un-comment part you are intersting
in.
-->

<configuration>

<!-- Default configuration : log on stdout appender, only root logger configured-->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>%-30(%d{HH:mm:ss.SSS} [%thread]) %-5level %logger{36} - %msg%n%xEx{5}</Pattern>
</layout>
</appender>

<!-- level are:
trace < debug < info < warn < error < off
"off" completely shut down logging for the given logger
-->
<root level="info">
<appender-ref ref="STDOUT" />
</root>
<!--
Debug LDAP write operations
===========================
This logger allow to trace LDAP writes operation and
to output them in LDIF file (the output directory path
is configured in the main configuration file)
The trace is done only if level is set to "trace"
WARNING: setting the level to trace may have major
performance issue, as A LOT of LDIF files will have
to be written.
You should activate that log only for debugging purpose.
-->
<logger name="trace.ldifreport.in.file" level="off" />

<!-- You can define other appender, like a file appender -->
<!--
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>foo.log</file>
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>%date %level [%thread] %logger{10} [%file : %line] %msg%n
</Pattern>
</layout>
</appender>
-->

<!--
You can specify log level for package and class,
they inherit the root appender.
<logger name="foo" level="INFO" />
<logger name="foo.MyClass" level="DEBUG" />
-->

<!--
An appender that will log ALL LDAP update requests (modify, add, delete) in
the file configured by the property "ldapDebugLog".
It may be quite verbose.
-->
<!--
<logger name="com.normation.cmdb.ldap.LDAPConnection" level="TRACE" />
-->
<!--
You can also define other appender for sub-trees.
Be careful, in this case, appender are cumulative
(log will be outputed both on STDOUT and in FILE
<logger name="foo.bar.OtherClass" >
<appender-ref ref="FILE" />
</logger>
-->
<!--
if you don't want appender to be cumulative, add additivity
parameter and set it to false:
<logger name="foo.bar.OtherClass" additivity="false">
<appender-ref ref="FILE" />
</logger>
-->
<!--
You can define properties and used them in place of parameter:
<property name="USER_HOME" value="/home/foohome" />
Properties may also come from a file:
<property file="src/main/java/foo/bar/baz/variables.properties" />
Or from a classpath resource:
<property resource="resource.properties" />

And properties may be compose with other properties:
USER_HOME=/home/foohome
fileName=myApp.log
destination=${USER_HOME}/${fileName}

-->

</configuration>
    (1-1/1)