Return-Path: Delivered-To: apmail-logging-log4j-user-archive@www.apache.org Received: (qmail 22805 invoked from network); 3 Mar 2008 21:52:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Mar 2008 21:52:55 -0000 Received: (qmail 89270 invoked by uid 500); 3 Mar 2008 21:52:48 -0000 Delivered-To: apmail-logging-log4j-user-archive@logging.apache.org Received: (qmail 89231 invoked by uid 500); 3 Mar 2008 21:52:48 -0000 Mailing-List: contact log4j-user-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Users List" Reply-To: "Log4J Users List" Delivered-To: mailing list log4j-user@logging.apache.org Received: (qmail 89186 invoked by uid 99); 3 Mar 2008 21:52:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Mar 2008 13:52:47 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [70.98.214.162] (HELO mail.comotivsystems.com) (70.98.214.162) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Mar 2008 21:51:57 +0000 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5 Subject: RE: Chainsaw Tab identifier Date: Mon, 3 Mar 2008 13:52:14 -0800 Message-ID: In-Reply-To: <43D40895-DDEC-4DC4-B544-DF43553E79F5@theebsgroup.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Chainsaw Tab identifier Thread-Index: Ach9cXN5d0WMhnXwRd+Gi8G6JdZOuAABu9jQ References: <2CDE3AB0-2ED3-477B-A810-0D842809EE8A@theebsgroup.com> <43D40895-DDEC-4DC4-B544-DF43553E79F5@theebsgroup.com> From: "Scott Deboy" To: "Log4J Users List" X-Virus-Checked: Checked by ClamAV on apache.org SocketHubAppender doesn't have the 'application' property support built into the appender like 1.2.15 socketappender does, so to use the application property with sockethubappender, you'd have to: - use log4j 1.2.15 on the appender side - also include the receivers companion in the classpath - specify a rewriteappender which adds the 'application' property and forwards events to the sockethubappender I haven't tested that, but it should work.. Btw, log4j 1.3 sockethubappender supported a 'buffersize' param which would forward the last X events to the connecting sockethubreceiver, but it doesn't look like that was back-ported to log4j 1.2.15. 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: Jason Tholstrup [mailto:jason.tholstrup@theebsgroup.com]=20 Sent: Monday, March 03, 2008 12:57 PM To: Log4J Users List Subject: Re: Chainsaw Tab identifier Sorry Scott I had not tried your instructions before I replied last =20 time. I can get PROP.log4j.remoteSourceInfo to show up in my tab identifier =20 but PROP.application does not seem to work (which to be honest is much =20 closer to what I want). I've seen that there is an issue with the =20 serialized object translation from the 1.2.X branch to the 1.3 based =20 chainsaw v2 download, and I don't receive Class, Method, File, or Line =20 information in my logs. Is this possibly the reason PROP.application =20 does not show up, or is there something else I have missed? Here is the log4j.properties snippet for my app. I've bounced my =20 server container just to make sure it reloaded and PROP.application =20 continues to return nothing in chainsaw log4j.properties sinppet (on server) log4j.appender.HUB=3Dorg.apache.log4j.net.SocketHubAppender log4j.appender.HUB.port=3D9005 log4j.appender.HUB.LocationInfo=3Dtrue log4j.appender.HUB.Threshold=3DDEBUG log4j.appender.HUB.application=3DSES Test Tab identifier string PROP.application - PROP.log4j.remoteSourceInfo chainsaw.xml ?xml version=3D"1.0" encoding=3D"UTF-8" ?> Jason Tholstrup On Mar 3, 2008, at 11:42 AM, Scott Deboy wrote: > Two things: > > 1. To get every socketappender connection to display in its own tab in > Chainsaw, use PROP.log4j.remoteSourceInfo as the tab identifier (note > the log4j. in front of the property name - log4j. isn't some special > property name, that's just the name of the property). > > 2. The 'application' property on socketappender is how you route =20 > events > to different tabs when the two apps are running on the same server and > using socketappender. > > Here's an example of that config: > > class=3D"org.apache.log4j.net.SocketAppender"> > > > > > > > Use a different value in the 'application' param for each of the > socketappender configs and you should be fine. > > > 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: Jason Tholstrup [mailto:jason.tholstrup@theebsgroup.com] > Sent: Monday, March 03, 2008 9:24 AM > To: log4j-user@logging.apache.org > Subject: Chainsaw Tab identifier > > Hello, > > I'm trying to figure out what things I need to place in my Tab > identifier field to filter out my applications. I'm using log4j v > 1.2.13 and chainsaw v2. I have two applications running on the same > server and both are using a socketHubAppender on different ports. > > I don't have any location info so the default "PROP.hostName - > PROP.application" only separates by hostname and since I'm running two > apps on the same server I get both logs dumped to the same tab. I've > tried adding PROP.remoteSourceInfo (since that is a column in the logs > that shows up and has the port number listed) and that property > appears to return nothing. It's my understanding that the location > info does not work in log4j 1.2.X. So my question is two fold. Is > there some reference that I can look at that will tell me what > properties are available, and can someone tell me how I would go about > doing this? I see in the comments for LoggingEventFieldResolver the > following field are available but nothing here seems like it will work > for me. Plus there seems to be no explanation of what keyName is in > PROP.keyName. > > * Field Name Field value (String > representation Return type > * LOGGER category name > (logger) String > * LEVEL > level Level > * CLASS locationInformation's class > name String > * FILE locationInformation's file > name String > * LINE locationInformation's line > number String > * METHOD locationInformation's method > name String > * MSG > message Object > * NDC > NDC String > * EXCEPTION throwable string > representation ThrowableInformation > * TIMESTAMP > timestamp Long > * THREAD > thread String > * PROP.keyName entry in the Property > hashtable String > * mapped to the key [keyName] > > > Any help would be appreciated. > > Jason Tholstrup > > > > > > --------------------------------------------------------------------- > 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 --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-user-help@logging.apache.org