Skip to content
Snippets Groups Projects
Commit 1d182fdf authored by ribeaudc's avatar ribeaudc
Browse files

minor: - Reformat the 'log.xml' files and use more actual examples for logger.

SVN: 9107
parent b2d70d64
No related branches found
No related tags found
No related merge requests found
...@@ -3,112 +3,115 @@ ...@@ -3,112 +3,115 @@
<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'> <log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>
<appender name="DEFAULT" class="org.apache.log4j.DailyRollingFileAppender"> <appender name="DEFAULT" class="org.apache.log4j.DailyRollingFileAppender">
<param name="File" value="logs/genericopenbis_log.txt" /> <param name="File" value="logs/genericopenbis_log.txt" />
<param name="DatePattern" value="'.'yyyy-MM-dd" /> <param name="DatePattern" value="'.'yyyy-MM-dd" />
<layout class="org.apache.log4j.PatternLayout"> <layout class="org.apache.log4j.PatternLayout">
<!-- <!--
// %d: outputs the date of the logging event. // %d: outputs the date of the logging event.
// %-5p: priority (i.e. level) of the logging event should be left justified to // %-5p: priority (i.e. level) of the logging event should be left justified to
// a width of five characters. // a width of five characters.
// %t: outputs the name of the thread that generated the logging event. // %t: outputs the name of the thread that generated the logging event.
// %c: outputs the category of the logging event. // %c: outputs the category of the logging event.
// %m: outputs the application supplied message associated with the logging event. // %m: outputs the application supplied message associated with the logging event.
// %X: outputs the MDC (mapped diagnostic context) associated with the thread that generated the logging event. // %X: outputs the MDC (mapped diagnostic context) associated with the thread that generated the logging event.
--> -->
<param name="ConversionPattern" value="%d %-5p [%t]%X{sessionInfo} %c - %m%n"/> <param name="ConversionPattern" value="%d %-5p [%t]%X{sessionInfo} %c - %m%n" />
</layout> </layout>
</appender> </appender>
<appender name="AUTH" class="org.apache.log4j.DailyRollingFileAppender"> <appender name="AUTH" class="org.apache.log4j.DailyRollingFileAppender">
<param name="File" value="logs/openbis_auth_log.txt" /> <param name="File" value="logs/openbis_auth_log.txt" />
<param name="DatePattern" value="'.'yyyy-MM-dd" /> <param name="DatePattern" value="'.'yyyy-MM-dd" />
<layout class="org.apache.log4j.PatternLayout"> <layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p [%t]%X{sessionInfo} %c - %m%n"/> <param name="ConversionPattern" value="%d %-5p [%t]%X{sessionInfo} %c - %m%n" />
</layout> </layout>
</appender> </appender>
<appender name="USAGE" class="org.apache.log4j.DailyRollingFileAppender"> <appender name="USAGE" class="org.apache.log4j.DailyRollingFileAppender">
<param name="File" value="logs/openbis_usage_log.txt" /> <param name="File" value="logs/openbis_usage_log.txt" />
<param name="DatePattern" value="'.'yyyy-MM-dd" /> <param name="DatePattern" value="'.'yyyy-MM-dd" />
<layout class="org.apache.log4j.PatternLayout"> <layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p [%t]%X{sessionInfo} %c - %m%n"/> <param name="ConversionPattern" value="%d %-5p [%t]%X{sessionInfo} %c - %m%n" />
</layout> </layout>
</appender> </appender>
<appender name="STDOUT" class="org.apache.log4j.ConsoleAppender"> <appender name="STDOUT" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout"> <layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p [%t] %c - %m%n" /> <param name="ConversionPattern" value="%d %-5p [%t] %c - %m%n" />
</layout> </layout>
</appender> </appender>
<!-- <!--
// Defined but not used right now. // Defined but not used right now.
--> -->
<appender name="NULL" class="org.apache.log4j.varia.NullAppender" /> <appender name="NULL" class="org.apache.log4j.varia.NullAppender" />
<appender name="EMAIL" class="org.apache.log4j.net.SMTPAppender"> <appender name="EMAIL" class="org.apache.log4j.net.SMTPAppender">
<param name="BufferSize" value="512" /> <param name="BufferSize" value="512" />
<param name="SMTPHost" value="localhost" /> <param name="SMTPHost" value="localhost" />
<param name="From" value="dmc@localhost" /> <param name="From" value="dmc@localhost" />
<param name="To" value="root@localhost" /> <param name="To" value="root@localhost" />
<param name="Subject" value="ATTENTION: openBIS Server" /> <param name="Subject" value="ATTENTION: openBIS Server" />
<param name="EvaluatorClass" value="ch.systemsx.cisd.common.logging.AlwaysTrueTriggeringEventEvaluator" /> <param name="EvaluatorClass"
value="ch.systemsx.cisd.common.logging.AlwaysTrueTriggeringEventEvaluator" />
<layout class="org.apache.log4j.PatternLayout"> <layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p [%t] %c - %m%n" /> <param name="ConversionPattern" value="%d %-5p [%t] %c - %m%n" />
</layout> </layout>
</appender> </appender>
<!-- <!--
// If we have the category 'NOTIFY' and we send a logging event with priority 'info', then an email will be sent. // If we have the category 'NOTIFY' and we send a logging event with priority 'info', then an email will be sent.
--> -->
<category name="NOTIFY"> <category name="NOTIFY">
<priority value="info" /> <priority value="info" />
<appender-ref ref="EMAIL" /> <appender-ref ref="EMAIL" />
</category> </category>
<!-- <!--
// If we have the category 'AUTH' and we send a logging event with priority 'info', then log to AUTH and USAGE. // If we have the category 'AUTH' and we send a logging event with priority 'info', then log to AUTH and USAGE.
--> -->
<category name="AUTH"> <category name="AUTH">
<priority value="info" /> <priority value="info" />
<appender-ref ref="AUTH" /> <appender-ref ref="AUTH" />
<appender-ref ref="USAGE" /> <appender-ref ref="USAGE" />
</category> </category>
<!-- <!--
// If we have the category 'TRACKING' and we send a logging event with priority 'info', then log to USAGE. // If we have the category 'TRACKING' and we send a logging event with priority 'info', then log to USAGE.
--> -->
<category name="TRACKING"> <category name="TRACKING">
<priority value="info" /> <priority value="info" />
<appender-ref ref="USAGE" /> <appender-ref ref="USAGE" />
</category> </category>
<!-- <!--
// If we have the category 'ACCESS' and we send a logging event with priority 'info', then log to USAGE. // If we have the category 'ACCESS' and we send a logging event with priority 'info', then log to USAGE.
--> -->
<category name="ACCESS"> <category name="ACCESS">
<priority value="info" /> <priority value="info" />
<appender-ref ref="USAGE" /> <appender-ref ref="USAGE" />
</category> </category>
<!--
// Do not use log level debug otherwise plain passwords are readable. <!--
// Do not use log level debug otherwise plain passwords are readable.
--> -->
<logger name="httpclient.wire"> <logger name="httpclient.wire">
<level value="ERROR" /> <level value="ERROR" />
</logger> </logger>
<root> <root>
<priority value="info" /> <priority value="info" />
<appender-ref ref="DEFAULT" /> <appender-ref ref="DEFAULT" />
</root> </root>
</log4j:configuration> </log4j:configuration>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment