<logger name="Webapps">
<appender-ref ref="WebAppender"/>
</logger>
<logger name="Desktopapps">
<appender-ref ref="DesktopAppender"/>
</logger>
<logger name="Janitorapps">
<appender-ref ref="JanitorAppender"/>
</logger>
On 6/27/05, Schuweiler, Joel J. <[EMAIL PROTECTED]> wrote:
> How? :)
>
> -----Original Message-----
> From: James Stauffer [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 27, 2005 12:59 PM
> To: Log4J Users List
> Subject: Re: Filter based on category?
>
> That is easy to do as long as they are named with a dot on the end.
> Webapps.
> Desktopapps.
> Janitorapps.
>
> Then the standard way of setting up loggers would work fine for you.
>
> On 6/27/05, Schuweiler, Joel J. <[EMAIL PROTECTED]> wrote:
> > When you create a new logger you pass in a string. I have seen this
> > referred to as category but as far as a logging event is concerned I think
> > it's referred to as the logger name?
> >
> > Anyways, I am going to wind up having people (many) name their loggers such
> > that all loggers start with
> >
> > Webapps_
> > Desktopapps_
> > Janitorapps_
> >
> > Etc.
> > On the socket server side I would like to be able to send anything that
> > starts with webapps_ to a different file then desktopapps_ and janitorapps_
> >
> > -----Original Message-----
> > From: James Stauffer [mailto:[EMAIL PROTECTED]
> > Sent: Monday, June 27, 2005 11:55 AM
> > To: Log4J Users List
> > Subject: Re: Filter based on category?
> >
> > Can you provide more details about what you want to do? Do you want
> > to filter based on a string in the category instead of the hierarchy
> > of the category?
> >
> > On 6/27/05, Schuweiler, Joel J. <[EMAIL PROTECTED]> wrote:
> > >
> > > Is there a way to use the category chunk in the xml config files to
> > > "filter" which appender to use or am I better off making a custom filter
> > > which checks the category? I have tested and read that the
> > > StringMatchFilter only matches against the message.
> > >
> > > ---------------------------------------------------------------------
> > > 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]
>
>
--
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]