[logback-user] How To Use Filters
listid at qos.ch
Wed Jan 3 23:13:26 CET 2007
At 09:54 PM 1/3/2007, Yoram Forscher wrote:
>I see your point regarding the default configuration and it makes a lot of
>sense to provide some basic logging capability even if the user neglects
>to configure. The requirement to invoke shutdownAndReset(), though, is
>IMHO not elegant and error prone. Maybe you can internally clear the
>configuration when the user invoked doConfigure()?
If we automatically called shutdownAndReset() every time a configurator was
invoked, it would not be possible to do partial configurations. By partial
configuration, I mean configuration of logback using multiple config files.
However, we might add this functionality in the future if it comes up again.
>Regarding logger.isXXXEnabled(marker), I thought it will give me the exact
>functionality that you mentioned, i.e., that it will depend on the marker
>value. When I used it I wanted to conditionally log some debug
>information that takes a lot of processing to generate. I did not want the
>overhead involved in generating this information if it will never be
>logged. When using log4j, I would put this kind of information at the
>TRACE level but this is not possible with logback. Do you see a good way
>to achieve this functionality?
I kind of see what you mean. However, could you give an example of
"information which takes a lot of processing to generate"? Maybe you can
use parameterized logging...
Logback: The reliable, generic, fast and flexible logging framework for Java.
More information about the Logback-user