I for one would definitely appreciate a short how-to and/or code.
 
Thanks,
 
BMMc.

________________________________

From: Rohit B Rai [mailto:[EMAIL PROTECTED]
Sent: Thu 6/29/2006 11:47 PM
To: Log4J Users List
Subject: RE: Ant Log4J not working



Thanks for the responses

I debugged it and found that it was not reading the configuration file.

It has to be done this way.

provide the full conf file URL!

=============================================================
D:\Working\netbeans\myAntRunner>set ANT_OPTS=-Dlog4j.debug
-Dlog4j.configuration=file:///d:/Working/netbeans/myAntRunner/log4j.prop
erties

D:\Working\netbeans\myAntRunner>ant -listener
org.apache.tools.ant.listener.Log4jListener
=================================================================

it's working now!!! Also made it use the SocketAppender and default
SocketServer to publish to a remote server. Got a consolidated build
report from various systems!!! ;)

I hope it helps you all. Will write in a short howto and release some
code asap!

Regards,

Rohit B. Rai,
Cordys R&D (India) Pvt. Ltd.
------------------------------------------------------------------------
------
If you haven't found something you are willing to die for, you are not
fit to live!


-----Original Message-----
From: James Stauffer [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 29, 2006 8:20 PM
To: Log4J Users List
Subject: Re: Ant Log4J not working

If you added -Dlog4j.debug to the command line log4j will output info
to std. out. telling you how it tries to configure itself.

On 6/29/06, jaikiran pai <[EMAIL PROTECTED]> wrote:
> Rohit,
>   This means that the log4j.properties file that you have created in
NOT in the classpath. Make it available in the classpath.
>
>   regards,
>   -Jaikiran
>
> Rohit B Rai <[EMAIL PROTECTED]> wrote:
>   I am trying to use Log4J for logging from Ant but it gives these
errors.
>
>
>
> log4j:WARN No appenders could be found for logger
> (org.apache.tools.ant).
>
> log4j:WARN Please initialize the log4j system properly.
>
>
>
> I have created the log4j.properties file. Its contents are
>
>
>
> log4j.rootCategory=file
>
> 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
>
>
>
> I have placed this file along with the build file.
>
>
>
> Also I have tried setting log4j.configuration property directly from
> command line and also using ANT_OPTS, but it is not working.
>
>
>
> Getting log4j logging is crucial for the project I am planning. Please
> help and respond ASAP
>
>
>
> Regards,
>
> Rohit B. Rai,
>
> Cordys R&D (India) Pvt. Ltd.
>
>
------------------------------------------------------------------------
> ------
>
> If you haven't found something you are willing to die for, you are not
> fit to live!
>
>
>
>
>
************************************************************************
***************************
> The information in this message is confidential and may be legally
privileged.
> It is intended solely for the addressee. Access to this message by
anyone else is
> unauthorized. If you are not the intended recipient, any disclosure,
copying, or
> distribution of the message, or any action or omission taken by you in
reliance
> on it is prohibited and may be unlawful. Please immediately contact
the sender if
> you have received this message in error. This email does not
constitute any
> commitment from Cordys Holding BV or any of its subsidiaries except
when
> expressly agreed in a written agreement between the intended recipient
and
> Cordys Holding BV or its subsidiaries.
>
************************************************************************
***************************
>
>
>
>
> ---------------------------------
>  Yahoo! India Answers: Share what you know. Learn something new Click
here
> Catch all the FIFA World Cup 2006 action on Yahoo! India Click here
>


--
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


***************************************************************************************************
The information in this message is confidential and may be legally  privileged.
It is intended solely for the addressee. Access to this message by anyone else 
is
unauthorized. If you are not the intended recipient, any disclosure, copying, or
distribution of the message, or any action or omission taken by you in reliance
on it is prohibited and may be unlawful. Please immediately contact the sender 
if
you have received this message in error. This email does not constitute any
commitment  from Cordys Holding BV or any of its subsidiaries except when
expressly agreed in a written agreement between the intended recipient and
Cordys Holding BV or its subsidiaries.
 
***************************************************************************************************


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to