All seem to be good ideas.  IMHO it would be sufficient to make 'name'
referenceable via "tab identifier" (option 2).  I'm not too familiar
with the codebase, but it already seems to be defined in PluginSkeleton.

-----Original Message-----
From: Scott Deboy [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 27, 2006 12:42 PM
To: Log4J Users List
Subject: RE: chainsaw - tab labels for LogFilePatternReceiver

There are a few options (maybe more, these are the ones off the top of
my head):

- We could support truncation in the 'tab identifier' mechanism (using
conventions similar to sprintf or patternlayout)...

- We could have the receiver add the receiver name as a 'name' event
property, similar to how the receiver defines 'application' and
'hostname' properties

- We could add 'hostname' and 'application' as bean params (the same as
what you're doing now, but without the need to use 'path')

Scott

-----Original Message-----
From: Evans, Jess [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 27, 2006 9:13 AM
To: log4j-user@logging.apache.org
Subject: chainsaw - tab labels for LogFilePatternReceiver

I'm setting up chainsaw to tail log files from several environments.
The tab names for these receivers are defaulting to "file - <filepath>".
In my case, the path is pretty long and makes the tab name
undescriptive.  Is there an easy way to override the names for these
tabs?  I tried to change the "tab identifier" value to PROP.name, but
that doesn't seem valid.  The only way I've found to date is to make the
host and path attributes of the LogFilePatternReceiver class true bean
attributes, so that I can set them in my log4j configuration e.g.

   <plugin name="LogFileReceiver"
class="org.apache.log4j.varia.LogFilePatternReceiver">
     <param name="host" value="Foo"/>
     <param name="path" value="Bar"/>
     ...
   </plugin>

This solution leaves me feeling kind of dirty, like I'm addressing the
symptom instead of the cause.  Is there some blatantly simple way of
labeling these tabs that I'm overlooking?  I don't want the tab names
dependent upon the content of my log files.

---------------------------------------------------------------------
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]

Reply via email to