/webportal_config/prod/log4j_template.xml
http://alageospatialportal.googlecode.com/ · XML · 48 lines · 32 code · 4 blank · 12 comment · 0 complexity · 403fef7685f8bbdd01240d680dc772aa MD5 · raw file
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
- <!--
- This is a template from which the log4j.xml file will be built.
- The variables: **SERVER_NAME** and **PORTAL_NAME** will be replaced
- at runtime by the hostname and portal_name key from portal.properties
- respectivly. The log4j.xml file will then be written and log4j will
- reload. This is the most effective way I could find of changing the
- ConversionPattern value, as using an MDC and variable substitution
- didn't work properly because different threads needed to change
- the portal name value
- -->
- <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
- <appender name="console" class="org.apache.log4j.ConsoleAppender">
- <param name="Target" value="System.out"/>
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern" value="%d{ISO8601} %5p [%t] (%F:%L) **SERVER_NAME** **PORTAL_NAME** - %m%n"/>
- </layout>
- </appender>
- <appender name="email" class="org.apache.log4j.net.SMTPAppender">
- <param name="BufferSize" value="512" />
- <param name="SMTPHost" value="postoffice.utas.edu.au" />
- <param name="From" value="gjsw@utas.edu.au" />
- <param name="To" value="bjward@utas.edu.au" />
- <param name="Subject" value="[WEBPORTAL] Application message" />
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern"
- value="[%d{ISO8601}] **SERVER_NAME** **PORTAL_NAME** %n%n%-5p%n%n%c%n%n%m%n%n" />
- </layout>
- <filter class="org.apache.log4j.varia.LevelRangeFilter">
- <param name="LevelMin" value="WARN"/>
- <param name="LevelMax" value="FATAL"/>
- </filter>
- </appender>
- <logger name="org.springframework">
- <level value="warn"/>
- </logger>
- <root>
- <priority value ="debug" />
- <appender-ref ref="console" />
- <!-- <appender-ref ref="email" /> -->
- </root>
- </log4j:configuration>