ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 29539] New: - Log4jListener section of Ant Listeners & Loggers Doc Enhancement
Date Sat, 12 Jun 2004 17:37:29 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29539>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29539

Log4jListener section of Ant Listeners & Loggers Doc Enhancement

           Summary: Log4jListener section of Ant Listeners & Loggers Doc
                    Enhancement
           Product: Ant
           Version: 1.6.1
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Documentation
        AssignedTo: dev@ant.apache.org
        ReportedBy: erico@sedonacorp.com


The Log4jListener section of the Ant Listeners & Loggers doc
(docs/manual/listeners.html) could be more helpful to newcomers by providing two
things:

1. A simple comment that the log4j.properties file needs to be in the Ant
   classpath.

2. An example Log4j configuration to get people started.

The following patch accomplishes both.  Please consider incorporating.

--- listeners.html.orig	Thu Feb 12 14:33:16 2004
+++ listeners.html	Sat Jun 12 12:23:31 2004
@@ -296,6 +296,31 @@
 
 </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.</p>
+
+<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>
+
 <h3><a name="XmlLogger">XmlLogger</a></h3>
 
 <p>Writes all build information out to an XML file named log.xml, or the value

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message