ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ciramella, EJ" <ECirame...@emptoris.com>
Subject RE: log4j question...
Date Wed, 10 Mar 2004 20:57:11 GMT
Just using it instead of maillogger so I can see what is going on if there
is a failure the -Dlog4j.properties doesn't work, I get the same error
messages as I would if the log4j jar was not in the anthome/lib dir:

props file:
 
log4j.rootCategory=INFO,file
log4j.category.org.apache.tools.ant.Project=INFO,file,mail
 
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.layout=org.apache.log4j.TTCCLayout
log4j.appender.file.file=build.log
log4j.appender.file.maxBackupIndex=3
log4j.appender.file.maxFileSize=100KB
 
log4j.appender.mail=org.apache.log4j.net.SMTPAppender
log4j.appender.mail.layout=org.apache.log4j.HTMLLayout
log4j.appender.mail.Threshold=WARN
log4j.appender.mail.SMTPHost=10.10.50.12
log4j.appender.mail.bufferSize=1
log4j.appender.mail.to=eciramella@emptoris.com
log4j.appender.mail.from=eciramella@emptoris.com
log4j.appender.mail.subject=Hello mail!
 
 
commandline:
 
C:\ePASS4.1-WL61>ant  -listener org.apache.tools.ant.listener.Log4jListener
-Dlog4j.configura
tion=log4j.properties compile
 

-----Original Message-----
From: Doug Lochart [mailto:dlochart@capecomputing.com]
Sent: Wednesday, March 10, 2004 3:56 PM
To: Ant Users List
Subject: Re: log4j question...


I believe that at this point ANT does not include the $ANT_HOME/lib
directory as part of its classpath.
Only the jars within the directory are put in the classpath thus you jar
w/properties file worked.
Maybe this could be done in the future.  All you <should> have to do is
provide the _dlog4j.configuration=...
when you run ant and it then should available.

You may want to describe how you are using log4j within ant (exec'ing a java
class that uses it ... etc) so that
I/we may be able to provide an alternate solution.

Doug


Now I've gained some understanding
Of the only world that we see.
Things that I once dreamed of
Have become reality.

These walls that still surround me
Still contain the same old me,
Just one more who's searching for
A world that ought to be.
----- Original Message ----- 
From: "Ciramella, EJ" <ECiramella@emptoris.com>
To: <user@ant.apache.org>
Sent: Wednesday, March 10, 2004 1:24 PM
Subject: log4j question...


> Is there any way to put log4j.properties in $ANT_HOME/lib or some other
> really high level dir to get it picked up automatically?  The only way
I've
> found this possible is to put this property file in a jar in the lib
> directory.
>
> I tried the -D option, but to no avail.  Looks like it needs to be in the
> classpath.
>


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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message