If you can use log4j 1.3 on the appender side, the expression syntax used by Chainsaw is available in a filter: org.apache.log4j.filter.ExpressionFilter, just add the ExpressionFilter to your dbappender in your appender config xml.
OR... You COULD add the same dbappender with an expressionfilter to the Chainsaw xml config file. The appender would send any events received by chainsaw -which match the expression filter- to the database (as well as to tabs).... BUT...that means Chainsaw has to be running to store events in the database - probably something you don't want to do if you need to make sure events ALWAYS make it into the database... Good luck! Scott -----Original Message----- From: Giordano Cerizza [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 08, 2006 10:22 AM To: Log4J Users List Subject: Re: XML file for a custom expression in LogPanel (Chainsaw v2) Hi Scott, thanks a lot for your reply but I suspected it! About writing lines to implement some features, I could do but now it's not my main aim. Maybe in the future. This morning I was try to figure out if it was possible to set up different kind of branches (not only logging viewer). I mean, is it possible for Chainsaw send logging messages to a database and not only to other tabs? Or in another way: can Chainsaw work as a dispatcher and send logging messages to different branches at the same time (db, windows, files...)? If no, don't you know any other Log4j tool for logging services with xml configurating features and working as a dispatcher? Thanks again for you kindness but find docs about that is really hard! Best regards Giordano Scott Deboy wrote: > Currently there's no way to have custom expression logpanel entries open > on Chainsaw start. > > The only automatic tab routing mechanism available is the 'tab > identifier' setting available from the view-show application wide > preferences menu. > > Some useful tab identifiers include: > > LEVEL > Route all events with a specific severity to a common tab > > PROP.log4j.remoteSourceInfo > Route all socketappender-generated events for each client to a new tab > > The default tab identifier (PROP.application-PROP.hostname) is useful if > you're using log4j 1.3 appenders - a number of the 1.3 appenders set > these properties. > > If you'd like to add this ability and contribute it back, we'd gladly > review it for inclusion! > > Hope this helps > > Scott > > > -----Original Message----- > From: Giordano Cerizza [mailto:[EMAIL PROTECTED] > Sent: Monday, August 07, 2006 12:29 PM > To: [email protected] > Subject: XML file for a custom expression in LogPanel (Chainsaw v2) > > Hi all, > I am a newbie in Log4j programming and I need help about writing an > log4j.xml file to run with Chainsaw v2. > The problem is: I can manage and display different messages coming from > different modules and split them off in a tab (go to "Create custom > expression LogPanel" and write the expression "LOGGER = = 'com.xxx.XYZ' > && LEVEL = = INFO" for example) but I would like to configure the xml > file to do that in advance. > I didn't find any useful docs about that. > Thanks in advance for your help > Best Regards > Giordano Cerizza > > --------------------------------------------------------------------- > 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] > > > --------------------------------------------------------------------- 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]
