PageRenderTime 19ms CodeModel.GetById 14ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/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
 1<?xml version="1.0" encoding="UTF-8" ?>
 2<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
 3<!--
 4This is a template from which the log4j.xml file will be built.
 5
 6The variables: **SERVER_NAME** and **PORTAL_NAME** will be replaced
 7at runtime by the hostname and portal_name key from portal.properties
 8respectivly.  The log4j.xml file will then be written and log4j will
 9reload.  This is the most effective way I could find of changing the
10ConversionPattern value, as using an MDC and variable substitution
11didn't work properly because different threads needed to change
12the portal name value
13-->
14<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
15
16
17    <appender name="console" class="org.apache.log4j.ConsoleAppender">
18        <param name="Target" value="System.out"/>
19        <layout class="org.apache.log4j.PatternLayout">
20            <param name="ConversionPattern" value="%d{ISO8601} %5p [%t] (%F:%L) **SERVER_NAME** **PORTAL_NAME** - %m%n"/>
21        </layout>
22    </appender>
23
24    <appender name="email"  class="org.apache.log4j.net.SMTPAppender">
25        <param name="BufferSize" value="512" />
26        <param name="SMTPHost" value="postoffice.utas.edu.au" />
27        <param name="From" value="gjsw@utas.edu.au" />
28        <param name="To" value="bjward@utas.edu.au" />
29        <param name="Subject" value="[WEBPORTAL] Application message" />
30        <layout class="org.apache.log4j.PatternLayout">
31            <param name="ConversionPattern"
32                   value="[%d{ISO8601}] **SERVER_NAME** **PORTAL_NAME** %n%n%-5p%n%n%c%n%n%m%n%n" />
33        </layout>
34        <filter class="org.apache.log4j.varia.LevelRangeFilter">
35            <param name="LevelMin" value="WARN"/>
36            <param name="LevelMax" value="FATAL"/>
37        </filter>
38    </appender>
39    <logger name="org.springframework">
40        <level value="warn"/>
41    </logger>
42    <root> 
43        <priority value ="debug" />
44        <appender-ref ref="console" />
45        <!--  <appender-ref ref="email" /> -->
46    </root>
47
48</log4j:configuration>