Hi,
thanks for your help. As a start I don't even know how to accomplish this
for straight category names, i.e.
without wildcards. Can you tell me?
Actually my categories are of the form
cat.a
cat.b
someother.cat
Or more precisely, they are a package hierarchy since I create categories
with this.getClass().getName().
So inheritance could be an option if "cat" above is the super category. How
can I define such a category hierarchy?
Is the dot "." as separator enough or is double colon "::" as in your reply
required ?
As i use a personal proxy class for log4j I could replace all "." with "::"
to create the hierachy if that is what is needed.
What do you think ?
Stefan
mschilli1@aol
.com An: [EMAIL PROTECTED] ("Log4J
Users List")
Kopie:
24.09.2002 Thema: Re: How to log specific category to
specific file ??
08:58
Bitte
antworten an
"Log4J Users
List"
In a message dated Tue, 24 Sep 2002 1:36:43 AM Eastern Standard Time,
[EMAIL PROTECTED] writes:
>Given 3 categories "category1", "category2" and "SomeOther" how do I
set up a log4j property file to
>only log messages of "category2" ?
>Are wildcards possible to e.g. only log "category*"
>but not "SomeOther" ?
I don't think you can do 'wildcard'-matching with category names (I've
thought briefly about doing this in Perl where it would even be possible,
but in Java that's pretty far-fetched).
The log4j philosophy is based on inheritance: if category1 and category2
are derived from the same base class (e.g. someclass::category1 and
someclass::category2), then you can easily define your desired behaviour by
just configuring the base class (someclass) to your needs -- the subclasses
will then just inherit it. Wouldn't that be an option?
-- Mike
############################
# Mike Schilli #
# [EMAIL PROTECTED] #
# http://perlmeister.com #
# log4perl.sourceforge.net #
############################
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]
>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>