You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Anuj Agrawal <ag...@lucent.com> on 2001/04/25 22:16:00 UTC

package level appenders/layouts

I'm using a log4j.properties file for configuration.

I understand it is possible to set:

    log4j.rootCategory=DEBUG, stdout

and if a different pattern or appender is required for a particular class

    log4j.category.com.lucent.somepackage.myclassname=DEBUG, anotherStdout

But is it possible to set it up so that all classes within a package (and
"sub-packages") use a different appender/layout than the rootCategory?

In each of my classes i have:
    private static Category myLogger =
Category.getInstance(myClassName.class.getName());
Do i need to change the above as well?

Thanks.
Anuj.



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Re: package level appenders/layouts

Posted by Ceki Gülcü <cg...@qos.ch>.
Anuj,

Why don't you just try it? See what happens. Have you read the documentation? Ceki


At 16:16 25.04.2001 -0400, you wrote:
>I'm using a log4j.properties file for configuration.
>
>I understand it is possible to set:
>
>    log4j.rootCategory=DEBUG, stdout
>
>and if a different pattern or appender is required for a particular class
>
>    log4j.category.com.lucent.somepackage.myclassname=DEBUG, anotherStdout
>
>But is it possible to set it up so that all classes within a package (and
>"sub-packages") use a different appender/layout than the rootCategory?
>
>In each of my classes i have:
>    private static Category myLogger =
>Category.getInstance(myClassName.class.getName());
>Do i need to change the above as well?
>
>Thanks.
>Anuj.
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org

--
Ceki Gülcü


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org