logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gülcü <c...@qos.ch>
Subject Re: Hierarchical logging
Date Sat, 24 May 2003 09:13:13 GMT
At 06:18 PM 5/23/2003 -0700, Rodrigo de Salvo Braz wrote:
>--- Ceki Gülcü <ceki@qos.ch> wrote:
>
>It is a good point, but suppose that detail level 1 is
>DEBUG, then detail levels from 2 to 8 are INFO, and 9
>is DEBUG again. If the logger is at DEBUG level, we
>would have
>
>* Info at level 1
>********* Info at level 9
>
>wasting space for markers. This may be a problem if
>you are actually showing the markers, as in the Emacs
>visualization, although at some point people should be
>using better visualizers anyway.

The result still shows correct indentation levels. The fact that
indentation levels 2-8 are empty should not matter. Or?

> >    MDC.incIndentationLevel();
> >    logger.debug("Calculating all products from
> > list.");
> >    logger.debug("do some logging.");
> >    logger.debug(Got all products of list.");
> >    MDC.decIndentationLevel();
> >
> > We can leverage the existing log4j infrastructure
> > with almost no
> > structural changes and still provide the same
> > service as the
> > DetailLogger class.
>
>I agree that this is the best solution, but it
>requires either extending MDC with or subclassing it
>for that functionality (if subclassing MDC is possible
>and advisable). It would probably require other
>methods also, for logging collections or setting
>options. Instead of leaving this for each user to do,
>it would be better to have as a class in log4j. The
>standardization would also favor things like having
>Chainsaw to have the option of nesting visualization
>at some point, with very little user setup.

This is the kind of functionality that we would like to
support within the log4j core. If we need to extend the MDC class to
do that, then that's what we will do.

>Are there any plans in that regard? I would like to
>help.

The plan is you and you subsume the plan. It is what you thought the plan
was in the past, what you think the plan is currently, what you will
think the plan will be in the future. When you think about what you
might think the plan would be, that's still the plan.

>Thanks,
>
>Rodrigo

--
Ceki  For log4j documentation consider "The complete log4j manual"
       ISBN: 2970036908  http://www.qos.ch/shop/products/clm_t.jsp 


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


Mime
View raw message