Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 27624 invoked from network); 27 Oct 2003 23:52:29 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 27 Oct 2003 23:52:29 -0000 Received: (qmail 9778 invoked by uid 500); 27 Oct 2003 23:52:03 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 9582 invoked by uid 500); 27 Oct 2003 23:52:02 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 9569 invoked from network); 27 Oct 2003 23:52:01 -0000 Received: from unknown (HELO smtp1.us4.outblaze.com) (205.158.62.78) by daedalus.apache.org with SMTP; 27 Oct 2003 23:52:01 -0000 Received: (qmail 22063 invoked from network); 27 Oct 2003 23:52:08 -0000 Received: from unknown (HELO puck.earthling.net) (wascallywabbit:earthling.net?mail.com@24.147.136.214) by 205-158-62-78.outblaze.com with SMTP; 27 Oct 2003 23:52:07 -0000 Message-Id: <6.0.0.22.2.20031027185000.02518508@pop1.mail.com> X-Sender: wascallywabbit:earthling.net#mail.com@pop1.mail.com X-Mailer: QUALCOMM Windows Eudora Version 6.0.0.22 Date: Mon, 27 Oct 2003 18:53:43 -0500 To: "Ant Users List" From: Wascally Wabbit Subject: Re: Log4jListener, and any good logger for builds? (long) In-Reply-To: <72068298CD99104AAEDE2FDF89AC160D0800E9@avanti.corp.worksca pe.net> References: <72068298CD99104AAEDE2FDF89AC160D0800E9@avanti.corp.workscape.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I needed a more consumer-friendly version of log4j listener too. Try the AntXtras and tasks. Both work with external log4j configuration and let you map ant-generated messages to your log4j categories. If you have any problems, post questions to this group if possible. The tasks can be downloaded from http://www.antxtras.info/download/ The Wabbit At 06:37 PM 10/27/2003, you wrote: >Hi, > >For one of our products I am writing a complex build/deploy tool. I am >implementing it as an Ant build script primarily because of time >constraints and because Ant has lots of awesome stuff built in that I >don't want (or have time) to re-invent. > >I had a requirement to make my tool keep a log for debugging and tech >suppport purposes. So my first pass was with using the >task. This worked fine for basic logging -- as long as you don't twiddle >it on and off too much throughout the build script, otherwise your script >is cluttered with all over the place. Basically I turn it on in >one target and have the others depend on it and the initial >setting works all the way through. > >Naturally the success of having a decent build log has led to more >requests for logging features like log rotation, log levels, >etc. Previously I overwrote the log every time, and eventually that's my >fallback position if this gets too time-consuming. :-) > > doesn't do all the nice logging subsystem stuff that Log4J can, >obviously, although integrating the two together would bring me closer to >what PM and QA are asking for. So, that's one possibility I think may be >worth investigating. > >My experiences with the Log4jListener and CommonsLoggingListener were >educational and I thought I would share here. > >1. Log4jListener doesn't seem to recognize or use the >-Dlog4j.configuration parameter *unless* you use the URL format to pass >the path to the config file. It doesn't pick up the config file in the >current directory either. > >2. CommonsLoggingListener is in the Hatcher/Loughran book, but not in the >Ant docs. Probably OK because it doesn't seem to work any better than >Log4jListener. > >3. Most importantly, Log4jListener isn't useful for build consumers >anyway, since it logs internal Ant log events and messages, *not* >user-defined (at the build script level) messages. So even if you can get >it to work, Log4jListener probably isn't what you want unless you're >logging messages in your own custom task code or you are an Ant developer. > >Any thoughts or advice? Similar experiences? > >Thanks, >Scott Stirling >Workscape, Inc. > >*********************************************************************** >This message is intended only for the use of the intended recipient and >may contain information that is PRIVILEGED and/or CONFIDENTIAL. If you >are not the intended recipient, you are hereby notified that any use, >dissemination, disclosure or copying of this communication is strictly >prohibited. If you have received this communication in error, please >destroy all copies of this message and its attachments and notify us >immediately. >*********************************************************************** > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: user-unsubscribe@ant.apache.org >For additional commands, e-mail: user-help@ant.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org