Log4J Ant OpenJMS

2006-06-29 Thread Rohit B Rai
How do I configure log4j in Ant to log to a JMS queue???

 

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.
 
***



RE: NoClassDefFound Error for org/apache/log4j/Layout

2006-06-29 Thread Bender Heri
It's not enough to just put it in the lib dir, you must include it in your 
classpath.
Heri

 -Original Message-
 From: venkatlakshmi [mailto:[EMAIL PROTECTED]
 Sent: Thursday, June 29, 2006 1:55 PM
 To: log4j-user@logging.apache.org
 Subject: NoClassDefFound Error for org/apache/log4j/Layout
 
 
 Hi all,
 
 I am using jakarta-log4j-1.2.8 in my java program to
 log errors. When I compile the program it runs fine.
 But when I execute it, it throws the following error 
 
 C:\VLakshmi\JCI\Equipment
 Interface\Code\WEB-INF\classesjava JCI.XMLInterface
 Exception in thread main
 java.lang.NoClassDefFoundError: org/apache/log4j/Layo
 ut
at JCI.XMLInterface.clinit(XMLInterface.java:20)
 
 It says that the class Layout is not found. But i
 have included the log4j-1.2.8.jar in \lib. Kindly help
 me to resolve this issue.
 
 
 
 With regards,
 
 Venkatlakshmi
 
 
 
   
 __
 Yahoo! India Answers: Share what you know. Learn something new
 http://in.answers.yahoo.com/
 
 -
 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: NoClassDefFound Error for org/apache/log4j/Layout

2006-06-29 Thread venkatlakshmi
Yes, I have included it in the classpath also.

Still it gives me the error.

--- Bender Heri [EMAIL PROTECTED] wrote:

 It's not enough to just put it in the lib dir, you
 must include it in your classpath.
 Heri
 
  -Original Message-
  From: venkatlakshmi
 [mailto:[EMAIL PROTECTED]
  Sent: Thursday, June 29, 2006 1:55 PM
  To: log4j-user@logging.apache.org
  Subject: NoClassDefFound Error for
 org/apache/log4j/Layout
  
  
  Hi all,
  
  I am using jakarta-log4j-1.2.8 in my java program
 to
  log errors. When I compile the program it runs
 fine.
  But when I execute it, it throws the following
 error 
  
  C:\VLakshmi\JCI\Equipment
  Interface\Code\WEB-INF\classesjava
 JCI.XMLInterface
  Exception in thread main
  java.lang.NoClassDefFoundError:
 org/apache/log4j/Layo
  ut
 at
 JCI.XMLInterface.clinit(XMLInterface.java:20)
  
  It says that the class Layout is not found. But
 i
  have included the log4j-1.2.8.jar in \lib. Kindly
 help
  me to resolve this issue.
  
  
  
  With regards,
  
  Venkatlakshmi
  
  
  
  
 

__
  Yahoo! India Answers: Share what you know. Learn
 something new
  http://in.answers.yahoo.com/
  
 

-
  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]
 
 




With regards,

Venkatlakshmi




__
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/

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



Ant Log4J not working

2006-06-29 Thread Rohit B Rai
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.
 
***



Re: Ant Log4J not working

2006-06-29 Thread jaikiran pai
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

RE: Chainsaw v2 configuration

2006-06-29 Thread Scott Deboy
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]

RE: NoClassDefFound Error for org/apache/log4j/Layout

2006-06-29 Thread Jacob Kjome
What does line 20 do?  Does it configure Log4j?  What JDK are you using?  What,
exactly, does your classpath look like?

Jake

Quoting venkatlakshmi [EMAIL PROTECTED]:

 Yes, I have included it in the classpath also.

 Still it gives me the error.

 --- Bender Heri [EMAIL PROTECTED] wrote:

  It's not enough to just put it in the lib dir, you
  must include it in your classpath.
  Heri
 
   -Original Message-
   From: venkatlakshmi
  [mailto:[EMAIL PROTECTED]
   Sent: Thursday, June 29, 2006 1:55 PM
   To: log4j-user@logging.apache.org
   Subject: NoClassDefFound Error for
  org/apache/log4j/Layout
  
  
   Hi all,
  
   I am using jakarta-log4j-1.2.8 in my java program
  to
   log errors. When I compile the program it runs
  fine.
   But when I execute it, it throws the following
  error
  
   C:\VLakshmi\JCI\Equipment
   Interface\Code\WEB-INF\classesjava
  JCI.XMLInterface
   Exception in thread main
   java.lang.NoClassDefFoundError:
  org/apache/log4j/Layo
   ut
  at
  JCI.XMLInterface.clinit(XMLInterface.java:20)
  
   It says that the class Layout is not found. But
  i
   have included the log4j-1.2.8.jar in \lib. Kindly
  help
   me to resolve this issue.
  
  


 With regards,

 Venkatlakshmi







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



RE: NoClassDefFound Error for org/apache/log4j/Layout

2006-06-29 Thread venkatlakshmi
Hi,

I found the solution to the problem. While configuring
the classpath, I specified the directory where the jar
file is available and I did not specify the exact jar
file in the directory. Thats where the problem was.
Now after including the name of the jar file in the
directory, it works fine.

Thanks a lot for all your efforts

--- Jacob Kjome [EMAIL PROTECTED] wrote:

 What does line 20 do?  Does it configure Log4j? 
 What JDK are you using?  What,
 exactly, does your classpath look like?
 
 Jake
 
 Quoting venkatlakshmi [EMAIL PROTECTED]:
 
  Yes, I have included it in the classpath also.
 
  Still it gives me the error.
 
  --- Bender Heri [EMAIL PROTECTED] wrote:
 
   It's not enough to just put it in the lib dir,
 you
   must include it in your classpath.
   Heri
  
-Original Message-
From: venkatlakshmi
   [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 29, 2006 1:55 PM
To: log4j-user@logging.apache.org
Subject: NoClassDefFound Error for
   org/apache/log4j/Layout
   
   
Hi all,
   
I am using jakarta-log4j-1.2.8 in my java
 program
   to
log errors. When I compile the program it runs
   fine.
But when I execute it, it throws the following
   error
   
C:\VLakshmi\JCI\Equipment
Interface\Code\WEB-INF\classesjava
   JCI.XMLInterface
Exception in thread main
java.lang.NoClassDefFoundError:
   org/apache/log4j/Layo
ut
   at
   JCI.XMLInterface.clinit(XMLInterface.java:20)
   
It says that the class Layout is not found.
 But
   i
have included the log4j-1.2.8.jar in \lib.
 Kindly
   help
me to resolve this issue.
   
   
 
 
  With regards,
 
  Venkatlakshmi
 
 
 
 
 
 
 

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




With regards,

Venkatlakshmi




__
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/

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



RE: Chainsaw v2 configuration

2006-06-29 Thread Scott Deboy
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]

RE: Ant Log4J not working

2006-06-29 Thread Rohit B Rai
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 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]