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" />
  <logger name="" additivity="false">
  <level value="debug" />
  <appender-ref ref="default.console" />
  <priority value="info" />
  <appender-ref ref="default.console" />

Published by


Java developper that loves photography and an excellent espresso

Leave a Reply

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

You are commenting using your 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 )

Connecting to %s