Minimal log4j.xml

Too often I copy my log4j.xml from one project to another so I figured I post it here as a template.


<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration debug="false">
  <appender name="default.console" class="org.apache.log4j.ConsoleAppender">
  <param name="target" value="System.out" />
  <param name="threshold" value="debug" />
  <layout class="org.apache.log4j.PatternLayout">
  <param name="ConversionPattern" value="%d{ISO8601} %-5p [%c{1}] - %m%n" />
  </layout>
  </appender>
  <logger name="com.halogensoftware.hosting" additivity="false">
  <level value="debug" />
  <appender-ref ref="default.console" />
  </logger>
  <root>
  <priority value="info" />
  <appender-ref ref="default.console" />
  </root>
</log4j:configuration>

Advertisements

Published by

m5c

Java developper that loves photography and good coffee

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s