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 Henriksen Niels Kristoffer <ni...@wmdata.com> on 2002/07/05 12:28:40 UTC

Category vs. Logger configuration

Hi!

I am co-working on a large project. We are in a transition from using
Category to Logger. During this transition, we will have uses of both
Category and Logger.

I want the configuration property file to configure both. Shall I configure
like this

  # Attach appender A1 to root. Set root priority to Prority.DEBUG.
  log4j.rootCategory=DEBUG, stdout, A1
  ...
  (in which case I think instances of the base class Category gets
configured, and therefore also instances of its subclass Logger)

or like this

  # Attach appender A1 to root. Set root priority to Prority.DEBUG.
  log4j.rootLogger=INFO, stdout, A1
  ...
  (in which case I think only instances of the subclass Logger gets
configured, but not instances its superclass Category)

???

Kindest regards

Niels K. Henriksen


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Category vs. Logger configuration

Posted by Ceki Gülcü <ce...@qos.ch>.


At 12:28 05.07.2002 +0200, Henriksen Niels Kristoffer wrote:
>Hi!
>
>I am co-working on a large project. We are in a transition from using
>Category to Logger. During this transition, we will have uses of both
>Category and Logger.
>
>I want the configuration property file to configure both. Shall I configure
>like this
>
>   # Attach appender A1 to root. Set root priority to Prority.DEBUG.
>   log4j.rootCategory=DEBUG, stdout, A1
>   ...
>   (in which case I think instances of the base class Category gets
>configured, and therefore also instances of its subclass Logger)

The produced references are actually Logger instances. Log4j 1.2 never
produces Category instances, only Logger instances.

>or like this
>
>   # Attach appender A1 to root. Set root priority to Prority.DEBUG.
>   log4j.rootLogger=INFO, stdout, A1
>   ...
>   (in which case I think only instances of the subclass Logger gets
>configured, but not instances its superclass Category)
>
>???
>
>Kindest regards
>
>Niels K. Henriksen

--
Ceki


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>