You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by "Cheung, Quinn" <QC...@rheinmetall.ca> on 2007/05/25 01:41:19 UTC

Zeroconf & Chainsaw with log4j-1.3alpha-8

I've configured a client application to use zeroconf to establish a connection with Chainsaw. Currently it all works fine with log4j-1.3alpha-7.

But for some reason there's a problem when I compile/run both the client app and Chainsaw with log4j-1.3alpha-8.  When I run them, I see my client app appearing in the zeroconf tab of chainsaw but right after that there's the following exception on the client side:

java.lang.NoSuchMethodError: org.apache.log4j.spi.ComponentBase.access$101(Lorg/apache/log4j/net/SocketHubReceiver;)Lorg/apache/log4j/ULogger;
	at org.apache.log4j.net.SocketHubReceiver$Connector.run(SocketHubReceiver.java:273)

As I mentioned, if I link everything back to the alpha-7 version it works fine.
Can anyone help?

Thanks and regards,

Quinn


-----Original Message-----
From: Scott Deboy [mailto:sdeboy@comotivsystems.com]
Sent: May 23, 2007 7:07 PM
To: Log4J Users List
Subject: RE: Third Party Appenders


You need something like ExecAppender (link below) combined with an
ExpressionFilter (currently in log4j 1.3) or StringMatchFilter.

http://www.ubookcase.com/book/Addison.Wesley/Apache.Jakarta.and.Beyond.A
.Java.Programmers.Introduction/0321237714/ch11lev1sec2.html



Scott Deboy


-----Original Message-----
From: Roger Varley [mailto:roger.varley@googlemail.com] 
Sent: Wednesday, May 23, 2007 4:37 AM
To: log4j-user@logging.apache.org
Subject: Third Party Appenders

Hi

Is there an appender that will allow me to monitor for a specific
message or list of specific messages and allow me to trigger an action
against those messages. I may need a different action for each
message.

Background.

I'm supporting a third party java web application. I don't have access
to the source code nor am I allowed to de-compile and modify the
source code. However, the application is using log4j for it's logging.
At the moment I'm manually monitoring the logfiles for the appearance
of specific messages and manually taking action based on those
messages.

I've tried writing a unix like "tail" program to monitor the logfile
directly but this fails overnight when the logfile rolls over to a new
logfile. So I thought that adding my own appender might be a more
elegant solution. I'm quite prepared to have a go at doing this myself
but I thought that I would check first in case this has already been
done. I'd also be grateful for alternate suggestions if it is
generally felt that this is not a good idea.

Regards
Gilbert

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


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


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


RE: log4cxx

Posted by Scott Deboy <sd...@comotivsystems.com>.
I believe a socket appender which sends logging events conforming to
log4j's DTD was developed for log4cxx (on the Chainsaw side, set up an
XMLSocketReceiver).

You could also write your logs to a text file and process the log file
in Chainsaw using LogFilePatternReceiver.



Scott Deboy
Principal Engineer
COMOTIV SYSTEMS
111 SW Columbia Street Ste. 950
Portland, OR  97201
Office: 503.224.7496
Direct Line: 503.821.6482
Cell: 503.997.1367
Fax: 503.222.0185
sdeboy@comotivsystems.com
www.comotivsystems.com

-----Original Message-----
From: Cheung, Quinn [mailto:QCheung@rheinmetall.ca] 
Sent: Wednesday, July 11, 2007 5:48 AM
To: Log4J Users List
Subject: log4cxx

Does anyone know if we can send log messages to Chainsaw from a log4cxx
client?  I haven't looked at it in detail, but is there a
socketHubAppender with log4cxx and are the objects written to the socket
compatible with what is read from chainsaw?


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


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


log4cxx

Posted by "Cheung, Quinn" <QC...@rheinmetall.ca>.
Does anyone know if we can send log messages to Chainsaw from a log4cxx client?  I haven't looked at it in detail, but is there a socketHubAppender with log4cxx and are the objects written to the socket compatible with what is read from chainsaw?


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


Re: Configuring a file appender using environment variable

Posted by Olivier Lefevre <le...@yahoo.com>.
For the record, the answer is wrong, as I just found out. The ${xxx} does
not expand the xxx environment variable but the xxx Java property, a big
difference! You can work around it by setting some custom property to the
value of the variable in question and using that property in your config,
though. In this particular case no workaround is needed since APPDATA is
the same as the user.home property.

Gallagher, Ron wrote:
> Quinn --
> 
> Use the syntax ${xxx} in your configuration file, replacing xxx with the
> name of the system property that you want to use.
> 
> Ron Gallagher, AT&T Mobility
> 
> -----Original Message-----
> From: Cheung, Quinn [mailto:QCheung@rheinmetall.ca] 
> Sent: Friday, June 01, 2007 10:06 AM
> To: Log4J Users List
> Subject: Configuring a file appender using environment variable
> 
> Is it possible to configure the output file of a file appender using the
> environment variable APPDATA (Windows XP)? What is the syntax in the
> log4j.properties file and do I have to send an argument to the JVM?
> 
> Thanks,
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org


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


RE: Configuring a file appender using environment variable

Posted by "Gallagher, Ron" <RG...@att.com>.
Quinn --

Use the syntax ${xxx} in your configuration file, replacing xxx with the
name of the system property that you want to use.

Ron Gallagher, AT&T Mobility

-----Original Message-----
From: Cheung, Quinn [mailto:QCheung@rheinmetall.ca] 
Sent: Friday, June 01, 2007 10:06 AM
To: Log4J Users List
Subject: Configuring a file appender using environment variable

Is it possible to configure the output file of a file appender using the
environment variable APPDATA (Windows XP)? What is the syntax in the
log4j.properties file and do I have to send an argument to the JVM?

Thanks,


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


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


Configuring a file appender using environment variable

Posted by "Cheung, Quinn" <QC...@rheinmetall.ca>.
Is it possible to configure the output file of a file appender using the environment variable APPDATA (Windows XP)? What is the syntax in the log4j.properties file and do I have to send an argument to the JVM?

Thanks,


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


Re: Location Information in Chainsaw

Posted by Paul Smith <ps...@aconex.com>.
You need to turn on Location information on the appender side that is  
sending events to chainsaw.

For example, SocketAppender:

http://logging.apache.org/log4j/docs/api/org/apache/log4j/net/ 
SocketAppender.html#setLocationInfo(boolean)


cheers,

Paul


On 19/06/2007, at 8:09 AM, Cheung, Quinn wrote:

> Does anyone know why log location information (ie: class name,  
> file, line etc... ) is not being displayed for logging events in  
> chainsaw?  The columns are shown in the panel for each of the log  
> events but they're always empty.
>
> Is there something I have to enable for the location information to  
> be displayed?
>
> Thanks,
>
> Quinn
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>

Paul Smith
Core Engineering Manager

Aconex
The easy way to save time and money on your project

696 Bourke Street, Melbourne,
VIC 3000, Australia
Tel: +61 3 9240 0200  Fax: +61 3 9240 0299
Email: psmith@aconex.com  www.aconex.com

This email and any attachments are intended solely for the addressee.  
The contents may be privileged, confidential and/or subject to  
copyright or other applicable law. No confidentiality or privilege is  
lost by an erroneous transmission. If you have received this e-mail  
in error, please let us know by reply e-mail and delete or destroy  
this mail and all copies. If you are not the intended recipient of  
this message you must not disseminate, copy or take any action in  
reliance on it. The sender takes no responsibility for the effect of  
this message upon the recipient's computer system.




Location Information in Chainsaw

Posted by "Cheung, Quinn" <QC...@rheinmetall.ca>.
Does anyone know why log location information (ie: class name, file, line etc... ) is not being displayed for logging events in chainsaw?  The columns are shown in the panel for each of the log events but they're always empty.

Is there something I have to enable for the location information to be displayed?  

Thanks,

Quinn

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