logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Deboy" <sde...@comotivsystems.com>
Subject RE: More chainsaw comments
Date Fri, 21 May 2004 19:06:30 GMT
The 'tab identifier' field in the application-wide preferences window controls how events are
routed to unique tabs.  The syntax used in this identifier is the same expression syntax used
by color rule expressions and the 'refine focus' field..

As events are received, the tab identifier expression is resolved based on that event's values.
 If there is an existing tab with matching values, the event is routed to that tab.  If there
isn't an existing tab matching the resolved values, a new tab is created.

For example, with the default identifier "PROP.hostname - PROP.application":

All received events with a 'hostname' property with a value of 'LOCALHOST', and an 'application'
property with a value of 'APPNAME' will be routed to the tab identified by 'LOCALHOST - APPNAME'

All received events with a 'hostname' property with a value of 'TESTMACHINE', and an 'application'
property with a value of 'APPNAME' will be routed to the tab 'TESTMACHINE - APPNAME'

This is a very powerful feature - you can change the expression and new events will be routed
based on the newly defined expression - for example, you can define an identifier of 'LEVEL'
and have all DEBUG events routed to a single tab, all ERROR events routed to a separate tab,
etc.

This allows you to combine events from separate sources into a single tab - if you had an
identifier 'PROP.application', events from both the TESTMACHINE and LOCALHOST would be collected
into the single APPNAME tab.


The 'Create custom expression log panel' feature is related and even more powerful - it allows
you to define a 'view' of existing and new events - effectively bypassing the unique tab identifier
routing mechanism and allowing you to route events to a tab on an ad hoc basis - it will collect
events from existing tabs and populate the new tab, as well as route new events to both this
new log panel (if applicable) as well as to the tab identifier-based panel.

The LoggingEventFieldResolver javadoc describes the supported keywords used by the tab identifier
and the custom tab expression mechanism - see the javadoc here: http://cvs.apache.org/viewcvs.cgi/jakarta-log4j/src/java/org/apache/log4j/spi/LoggingEventFieldResolver.java?rev=1.7&view=auto

Hope this helps,

Scott




-----Original Message-----
From: Ceki Gülcü [mailto:ceki@qos.ch] 
Sent: Friday, May 21, 2004 11:33 AM
To: log4j-dev@logging.apache.org
Subject: More chainsaw comments



Hi again,

The automatic direction of events to various panels is a very powerful 
feature. Is this feature documented somewhere?

The capability to focus on a logger is also very useful. Is it possible to 
focus on multiple loggers at once? It looked as if that was not the case.

Thanks in advance,

ps: Keep up the fantastic work.


-- 
Ceki Gülcü

      For log4j documentation consider "The complete log4j manual"
      ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp  



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


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


Mime
View raw message