logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Deboy" <sde...@comotivsystems.com>
Subject RE: Chainsaw Tab identifier
Date Mon, 03 Mar 2008 17:42:36 GMT
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 events
to different tabs when the two apps are running on the same server and
using socketappender.

Here's an example of that config:

    <appender name="SOCKET" class="org.apache.log4j.net.SocketAppender">
        <param name="remoteHost" value="localhost"/>
        <param name="LocationInfo" value="true"/>
        <param name="port" value="4560"/>
        <param name="application" value="someappname"/>
    </appender>

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


Mime
View raw message