RE: Ant Log4J not working

2006-07-03 Thread Rohit B Rai
Done!!!
Posted a short step by step at my blog.

Visit http://mytechrantings.blogspot.com

Regards,

Rohit B. Rai,
Cordys RD (India) Pvt. Ltd.

--
If you haven't found something you are willing to die for, you are not
fit to live!


-Original Message-
From: McCarty, Brian [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 30, 2006 6:43 PM
To: Log4J Users List
Subject: RE: Ant Log4J not working

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\myAntRunnerset ANT_OPTS=-Dlog4j.debug
-Dlog4j.configuration=file:///d:/Working/netbeans/myAntRunner/log4j.prop
erties

D:\Working\netbeans\myAntRunnerant -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 RD (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 RD (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 

RE: [SPAM (Bayesain Analysis)] - problems with logging - Bayesian Filter detected spam

2006-07-03 Thread Bender Heri
You didn't attach any appender to the loggers except the rootLogger.

It should look like this:

log4j.logger.org.apache.commons.httpclient=DEBUG, stdout

Probably you also want to set additivity of this logger to false, otherwise log 
entries it would appear twice in stdout (one time by this logger, the second 
time by the rootLogger):

log4j.logger.org.apache.commons.httpclient.additivity=false(- not shure 
about correct syntax, I usually use xml config files).


BTW: the term category is deprecated and replaced by logger with absolutely 
the same sematics.

Heri

 -Original Message-
 From: Eugeny N Dzhurinsky [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 30, 2006 9:43 AM
 To: log4j-user@logging.apache.org
 Subject: [SPAM (Bayesain Analysis)] - problems with logging - 
 Bayesian Filter detected spam
 
 
 Hello!
 I have strange problem with Log4J version 1.2.13
 My log4j.properties file looks like:
 
 log4j.rootLogger=ERROR, stdout
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 log4j.appender.stdout.layout.ConversionPattern=%5p 
 %d{dd/mm/yy hh:mm:ss} [%t] (%C{1}:%L) - %m%n
 log4j.logger.httpclient.wire=DEBUG
 log4j.logger.org.apache.commons.httpclient=DEBUG
 log4j.category.httpclient.wire=DEBUG
 
 For some reason I can see ERROR logs from my application, but 
 I can't see
 DEBUG logs for package org.apache.commons.httpclient (they are using
 commons.logging, which is supposed to work fine with log4j).
 
 Any ideas why is that and how to enable logging in this case?
 -- 
 Eugene N Dzhurinsky
 
 -
 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]



Re: Chainsaw v2 configuration

2006-07-03 Thread Faizan Ahmed

Thanks Scott. That worked.

On 6/30/06, Scott Deboy [EMAIL PROTECTED] wrote:


Correction..everything is working fine - you have to set your
timestampformat to match your input:

logformat:
[financing_tools_gcps] [LOGGER] [TIMESTAMP] [LEVEL] [Severity
PROP(SEVERITY)] [NDC] MESSAGE

timestampformat:
MM/dd HH:mm:ss

My previous post skipped over the LEVEL field...

Your logformat should work fine as well:
[*] [CLASS] [TIMESTAMP] [LEVEL] [*] [*] MESSAGE

I'd suggest you use LOGGER instead of CLASS though, because then you get
to use the logger tree for filtering (of course, you still need to set
timestampformat correctly).

Hope this helps.

Scott Deboy
COMOTIV SYSTEMS
111 SW Columbia Street Ste. 950
Portland, OR  97201

Telephone:  503.224.7496
Cell:   503.997.1367
Fax:503.222.0185

[EMAIL PROTECTED]

www.comotivsystems.com



-Original Message-
From: Scott Deboy [mailto:[EMAIL PROTECTED]
Sent: Thu 6/29/2006 6:06 AM
To: Log4J Users List
Subject: RE: Chainsaw v2 configuration

This works:

[financing_tools_gcps] [LOGGER] [TIMESTAMP] *Severity * [NDC] MESSAGE

It's getting confused by the brackets around the severity field (there
must be a bug in the parsing logic).

Scott Deboy
COMOTIV SYSTEMS
111 SW Columbia Street Ste. 950
Portland, OR  97201

Telephone:  503.224.7496
Cell:   503.997.1367
Fax:503.222.0185

[EMAIL PROTECTED]

www.comotivsystems.com



-Original Message-
From: Faizan Ahmed [mailto:[EMAIL PROTECTED]
Sent: Thu 6/29/2006 12:41 AM
To: log4j-user@logging.apache.org
Subject: Chainsaw v2 configuration

Hi

I'm trying to configure chainsaw v2 and found problem with log format,

Here's the format of the log files we have,

[financing_tools_gcps] [CountryCodeXRefProcess_impl] [06/29 03:29:25]
[DEBUG] [Severity 4] [EMAIL PROTECTED] a25sod001] getCountryXRef: country
code xref loaded.

Here's the entry in log4j.ini,

log4j.appender.profileLog.layout.ConversionPattern=[financing_tools_gcps]
[%c{1}] [%d{MM/dd HH:mm:ss}] [%p] [Severity %s] [%x] %m %n

I tried this in logFormat,
[*] [CLASS] [TIMESTAMP] [LEVEL] [*] [*] MESSAGE

But got the following error,

found non-matching line: [financing_tools_gcps]
[CountryCodeXRefProcess_impl] [06/29 03:29:25] [DEBUG] [Severity 4] [
[EMAIL PROTECTED] a25sod001] getCountryXRef: country code xref loaded.

Can anyone help me with the logformat.

Thanks in advance.
Faizan






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





--
It is useless to have a learned tongue but an ignorant heart. [Shaykh Abdal
Qadir al Jilani]


Re: problems with logging

2006-07-03 Thread Javier Gonzalez

You only have an appender attached to the root logger, and the root
logger is configured to show only messages of ERROR level and higher.

A possible fix is configuring the root Logger for DEBUG priority -
however, this will leave all loggers logging at DEBUG level.

Another fix could be configuring a second appender that logs to a
separate file, and attaching it to the loggers you are interested in
monitoring at DEBUG level.



On 6/30/06, Eugeny N Dzhurinsky [EMAIL PROTECTED] wrote:

Hello!
I have strange problem with Log4J version 1.2.13
My log4j.properties file looks like:

log4j.rootLogger=ERROR, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p %d{dd/mm/yy hh:mm:ss} [%t] 
(%C{1}:%L) - %m%n
log4j.logger.httpclient.wire=DEBUG
log4j.logger.org.apache.commons.httpclient=DEBUG
log4j.category.httpclient.wire=DEBUG

For some reason I can see ERROR logs from my application, but I can't see
DEBUG logs for package org.apache.commons.httpclient (they are using
commons.logging, which is supposed to work fine with log4j).

Any ideas why is that and how to enable logging in this case?
--
Eugene N Dzhurinsky

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





--
Javier González Nicolini

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



log4j custom filters how to?

2006-07-03 Thread Shroff, Sushama
Hi,

 

I am a new user to log4j. I need to write certain custom filters for
log4j and am wondering how it is to be done.

Any help regarding the same will be appreciated.

 

Thanks,

Sushama Shroff