tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Costin Manolache <>
Subject Re: Per-component logging
Date Wed, 05 Jul 2000 03:30:11 GMT
> Component code can send all the regular verbosity levels, like ERROR,

The problem is that we don't have only 4 levels for components - the
mapper have multiple grades of debug info, and this direction ( debug
is wrong - take a look at sendmail or squid for example.

We need to be able to turn on/off ( eventually at runtime ) individual
component.subcomponent debugging. ( mapper/request_parser,

The current scheme works good enough for it's goal ( debugging),
and we should change it only if we have a complete ( and better )

All "official" logs should use the Logger, and that should include
ERROR, WARN, INFO ( even ERROR > INFO is bad - most
people would like to be able to disable some types of errors,
but keep INFO).

What about just removing the ERROR/WARN/INFO/DEBUG and separate
the "log" from "debug" ?

> That means that if you want spew-level output for component Foo, which
> outputs to "tc_log", you must (a) set the "debug" attribute for Foo to
> 9 or 99 or whatever, and (b) set the "verbosityLevel" of the "tc_log"
> Logger object to "DEBUG".

Why not let Foo control it's own debug ?

And BTW, what is the meaning of "debug" in the logger after all , and who
will use it in this case ?

Sorry, I would rather keep the current system till we have a complete
Right now we don't even know exactly what we want from the debug
system. I like the timestamp changes and I think logger is in a better
and we can have a clean and nice solution, but leave the debugger out.

That will also simplify the logger. The debugger may use the Log object
as a tool, but it will be loose till we have a clear image of what we

> In other words, the component would have first crack, but the Logger
> has ultimate veto.  That way you can easily crank down the verbosity
> level globally, or set the Logger setting to DEBUG, in which case all
> components will be allowed to speak, but only the components you've
> set the "debug" attribute on will want to.
> It's really quite simple :-)

I don't think we are ready for that.

I'm -1 on changing too much the debug system, I depend on it and
I would like a better solution ( even if that will be later ).


View raw message