PropertyFilter (included in log4j 1.3 alpha) will add properties to every event 
processed by the filter.  This would probably fit the bill in the (possibly 
distant) future.

http://cvs.apache.org/viewcvs.cgi/logging-log4j/src/java/org/apache/log4j/filter/PropertyFilter.java?rev=1.1&view=markup

-----Original Message-----
From:   Schuweiler, Joel J. [mailto:[EMAIL PROTECTED]
Sent:   Mon 6/27/2005 12:51 PM
To:     'Log4J Users List'
Cc:     
Subject:        RE: Filter based on category?
While I'm not entirely sure what information it plans on sending to identify 
the app from any other hostname/ip and class name aren't going to do me a whole 
lot of good.

This is on a cluster. I would like to be able to assign some sort of 
prefix/postfix to the logger names and go from there. I would also like to do 
this in such a way that is standard and can be done from the config file. I 
would like it this way in case I decide to change to something besides jboss 
(most likely headed to websphere). 

-----Original Message-----
From: Scott Deboy [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 27, 2005 2:48 PM
To: Log4J Users List
Subject: RE: Filter based on category?

If you can use a log4j 1.3-based simplesocketserver (which relies on 
SocketNode), the HEAD revision of SocketNode adds a 'log4j.remoteSourceInfo' 
property to the logging event, which could be used to distinguish events from 
various sources (of course, 1.2.x -> 1.3 over serialized loggingEvent means no 
location info or MDC support for now).

See:

http://cvs.apache.org/viewcvs.cgi/logging-log4j/src/java/org/apache/log4j/net/SocketNode.java?rev=1.33&only_with_tag=MAIN&view=markup


-----Original Message-----
From:   Schuweiler, Joel J. [mailto:[EMAIL PROTECTED]
Sent:   Mon 6/27/2005 12:29 PM
To:     'Log4J Users List'
Cc:     
Subject:        RE: Filter based on category?
Ok for a lack of a good universal drawing tool I'm going to do dreaded ascii


Applications on a cluster <-> serialized log event <-> socket <-> internet <-> 
socket server <-> unserialized log event

On the socket server I'm looking for an easy way to tell who sent the log 
event. Is there an easy way to do this by naming the loggers a specific way and 
how would I handle this in my config?



-----Original Message-----
From: James Stauffer [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 27, 2005 2:26 PM
To: Log4J Users List
Subject: Re: Filter based on category?

That doesn't make sense to me.  That sounds wrong.  Can you give more details?

On 6/27/05, Schuweiler, Joel J. <[EMAIL PROTECTED]> wrote:
> If I use a dot it strips off the left side in the logging event
> 
> -----Original Message-----
> From: James Stauffer [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 27, 2005 2:17 PM
> To: Log4J Users List
> Subject: Re: Filter based on category?
> 
> I don't understand why you want to replace the dot with the underscore.
> 
> Are you trying to separate your logs based on the type of program?
> 
> On 6/27/05, Schuweiler, Joel J. <[EMAIL PROTECTED]> wrote:
> > I would do something like
> >
> > static Logger logger = Logger.getLogger("joel.SecondLogger");
> >
> > However if I want to do this it appears I need to make a custom filter and 
> > rename it to joel_SecondLogger (_ could be any char but .). This also 
> > leaves me with having to modify the log4j jar's that come with for ex. 
> > Jboss.
> >
> > At this point it might be best to just do
> >
> > static Logger logger = Logger.getLogger("SecondLogger.joel");
> >
> > -----Original Message-----
> > From: James Stauffer [mailto:[EMAIL PROTECTED]
> > Sent: Monday, June 27, 2005 1:59 PM
> > To: Log4J Users List
> > Subject: Re: Filter based on category?
> >
> > Does that mean that you would have a logger named something like
> > edu.mayo.package.myClass.WebApps?
> >
> > Is there a reason that you can't name it WebApps.edu.mayo.package.myClass?
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> --
> James Stauffer
> Are you good? Take the test at http://www.livingwaters.com/good/
> 
> ---------------------------------------------------------------------
> 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]
> 
> 


-- 
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/

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

Reply via email to