Browse Source

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
master
Jan Materne 19 years ago
parent
commit
1630de7abe
3 changed files with 42 additions and 5 deletions
  1. +3
    -2
      CONTRIBUTORS
  2. +6
    -2
      contributors.xml
  3. +33
    -1
      docs/manual/listeners.html

+ 3
- 2
CONTRIBUTORS View File

@@ -64,6 +64,7 @@ Don Jeffery
Drew Sudell Drew Sudell
Eli Tucker Eli Tucker
Emmanuel Bourg Emmanuel Bourg
Eric Olsen
Eric Pugh Eric Pugh
Erik Hatcher Erik Hatcher
Erik Langenbach Erik Langenbach
@@ -141,7 +142,7 @@ Marcel Schutte
Marcus Börger Marcus Börger
Mariusz Nowostawski Mariusz Nowostawski
Mark Hecker Mark Hecker
Mark R. Diggory
Mark R. Diggory
Martijn Kruithof Martijn Kruithof
Martin Landers Martin Landers
Martin Poeschl Martin Poeschl
@@ -175,7 +176,7 @@ Nico Seessle
Nigel Magnay Nigel Magnay
Oliver Merkel Oliver Merkel
Oliver Rossmueller Oliver Rossmueller
Oystein Gisnas
Oystein Gisnas
Patrick C. Beard Patrick C. Beard
Patrick Chanezon Patrick Chanezon
Patrick G. Heck (Gus Heck) Patrick G. Heck (Gus Heck)


+ 6
- 2
contributors.xml View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE contributors
<!DOCTYPE contributors
[ [
<!ELEMENT name (first?, middle?, last)> <!ELEMENT name (first?, middle?, last)>
<!ELEMENT contributors (introduction, name+)> <!ELEMENT contributors (introduction, name+)>
@@ -267,6 +267,10 @@
<first>Emmanuel</first> <first>Emmanuel</first>
<last>Bourg</last> <last>Bourg</last>
</name> </name>
<name>
<first>Eric</first>
<last>Olsen</last>
</name>
<name> <name>
<first>Eric</first> <first>Eric</first>
<last>Pugh</last> <last>Pugh</last>
@@ -982,4 +986,4 @@
<first>Zdenek</first> <first>Zdenek</first>
<last>Wagner</last> <last>Wagner</last>
</name> </name>
</contributors>
</contributors>

+ 33
- 1
docs/manual/listeners.html View File

@@ -302,6 +302,38 @@ corresponding Log4j level.</p>


</blockquote> </blockquote>


<p>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 <i>-lib</i> option:</p>

<blockquote>
<pre><code>ant -listener org.apache.tools.ant.listener.Log4jListener -lib .</code></pre>
</blockquote>

<p>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:</p>

<blockquote>

<pre><code>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
</code></pre>

</blockquote>

<p>For more information about configuring Log4J see <a href="http://logging.apache.org/log4j/docs/documentation.html">its
documentation page</a>.</p>

<h3><a name="XmlLogger">XmlLogger</a></h3> <h3><a name="XmlLogger">XmlLogger</a></h3>


<p>Writes all build information out to an XML file named log.xml, or the value <p>Writes all build information out to an XML file named log.xml, or the value
@@ -363,4 +395,4 @@ developers.</p>
Reserved.</p> Reserved.</p>


</body> </body>
</html>
</html>

Loading…
Cancel
Save