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: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to