-
1. Re: setting logging threshold on per app basis?
mikefinn Sep 13, 2002 8:05 AM (in response to tek1)The key is for each app to log to unique categories. If your apps are discernible by the Java packages in which the respective app classes reside, then base your categories on package name (or variant of).
For example:
app_a classes in : com.bar.foo.app_a.*
app_b classes in : com.bar.foo.app_b.*
and your categories are created via:
Category cat = Category.getInstance(com.bar.foo.app_a.Some.class);
Category cat = Category.getInstance(com.bar.foo.app_a.Some.class);
or using getClass().getName(),
Then, in log4j.xml:
app_a will log info msgs and app_b will show debug msgs.
HTH,
Mike -
2. Re: setting logging threshold on per app basis?
mikefinn Sep 13, 2002 8:06 AM (in response to tek1)The key is for each app to log to unique categories. If your apps are discernible by the Java packages in which the respective app classes reside, then base your categories on package name (or variant of).
For example:
app_a classes in : com.bar.foo.app_a.*
app_b classes in : com.bar.foo.app_b.*
and your categories are created via:
Category cat = Category.getInstance(com.bar.foo.app_a.Some.class);
Category cat = Category.getInstance(com.bar.foo.app_a.Some.class);
or using getClass().getName(),
Then, in log4j.xml:
app_a will log info msgs and app_b will show debug msgs.
HTH,
Mike -
3. Re: setting logging threshold on per app basis?
tek1 Sep 16, 2002 2:09 AM (in response to tek1)great! thank you very much!