From 1630de7abe2c58bd7158608e6d8694f3757abca2 Mon Sep 17 00:00:00 2001
From: Jan Materne
Date: Fri, 7 Jul 2006 12:32:20 +0000
Subject: [PATCH] Bug: 29539 More information about using the Log4jListener.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@419881 13f79535-47bb-0310-9956-ffa450edef68
---
CONTRIBUTORS | 5 +++--
contributors.xml | 8 ++++++--
docs/manual/listeners.html | 34 +++++++++++++++++++++++++++++++++-
3 files changed, 42 insertions(+), 5 deletions(-)
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index f4386fd75..5dea6ecda 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -64,6 +64,7 @@ Don Jeffery
Drew Sudell
Eli Tucker
Emmanuel Bourg
+Eric Olsen
Eric Pugh
Erik Hatcher
Erik Langenbach
@@ -141,7 +142,7 @@ Marcel Schutte
Marcus Börger
Mariusz Nowostawski
Mark Hecker
-Mark R. Diggory
+Mark R. Diggory
Martijn Kruithof
Martin Landers
Martin Poeschl
@@ -175,7 +176,7 @@ Nico Seessle
Nigel Magnay
Oliver Merkel
Oliver Rossmueller
-Oystein Gisnas
+Oystein Gisnas
Patrick C. Beard
Patrick Chanezon
Patrick G. Heck (Gus Heck)
diff --git a/contributors.xml b/contributors.xml
index b6c74cf0b..70fe5576e 100644
--- a/contributors.xml
+++ b/contributors.xml
@@ -1,5 +1,5 @@
-
@@ -267,6 +267,10 @@
Emmanuel
Bourg
+
+ Eric
+ Olsen
+
Eric
Pugh
@@ -982,4 +986,4 @@
Zdenek
Wagner
-
+
\ No newline at end of file
diff --git a/docs/manual/listeners.html b/docs/manual/listeners.html
index 2be4159ab..c371d1924 100644
--- a/docs/manual/listeners.html
+++ b/docs/manual/listeners.html
@@ -302,6 +302,38 @@ corresponding Log4j level.
+To use Log4j you will need the Log4j jar file and a 'log4j.properties'
+configuration file. Both should be placed somewhere in your Ant
+classpath. If the log4j.properties is in your project root folder you can
+add this with -lib option:
+
+
+ant -listener org.apache.tools.ant.listener.Log4jListener -lib .
+
+
+If, for example, you wanted to capture the same information output to the
+console by the DefaultLogger and send it to a file named 'build.log', you
+could use the following configuration:
+
+
+
+log4j.rootLogger=ERROR, LogFile
+log4j.logger.org.apache.tools.ant.Project=INFO
+log4j.logger.org.apache.tools.ant.Target=INFO
+log4j.logger.org.apache.tools.ant.taskdefs=INFO
+log4j.logger.org.apache.tools.ant.taskdefs.Echo=WARN
+
+log4j.appender.LogFile=org.apache.log4j.FileAppender
+log4j.appender.LogFile.layout=org.apache.log4j.PatternLayout
+log4j.appender.LogFile.layout.ConversionPattern=[%6r] %8c{1} : %m%n
+log4j.appender.LogFile.file=build.log
+
+
+
+
+For more information about configuring Log4J see its
+documentation page.
+
Writes all build information out to an XML file named log.xml, or the value
@@ -363,4 +395,4 @@ developers.
Reserved.