Vincent Hennebert wrote: > Victor Mote a écrit : > > Actually there is not a level named "debug", although I might have > > defined that constant equal to "finest" in one of the > earlier versions. > This does not appear in CVS. I would suggest you to redefine > such a constant to remove any ambiguity, as as you can see it > confused me. > > > Here is the > > way I mapped the Avalon levels in the AvalonLogger implementation: > > > http://cvs.sourceforge.net/viewcvs.py/axsl/axsl/axsl-common/src/java/o > > rg/axs l/common/AvalonLogger.java?view=markup > > > > FINEST debug > > FINER info > > FINE info > > CONFIG info > > INFO info > > WARNING warn > > SEVERE error > Why not. Is I know now that debug corresponds to finest I'll > follow the same scheme for commons Log. > > > I don't really feel strongly about it either, but perhaps a > bit more > > strongly than you for the following reasons: > > 1. From a sheer "standard" aspect, I wanted to stay as close to the > > Java logging system as possible. I would have used the > > java.util.logging.Level instances (for type safety) instead > of numeric > > constants, except for trying to retain Java 1.3 compatibility. > > 2. I prefer to allow for more granularity rather than less (within > > reason), even if we don't think we need it right now. > > 3. This is one of those things that you can change on > Tuesday to make > > one party happy, then change back again on Wednesday to > make another > > party happy, all for very little benefit. In short, there > is no way to > > make everyone happy. > I understand your concerns and agree with them. > > > > > Also, I don't know if you noticed the following methods: > > info(String message) > > warn(String message) > > error(String message) > > debug(String message) > > which correspond directly to the Avalon methods of the same > name, and > > are intended to provide a sort of mapping for them. > Certainly, but I also have to map the logMessage method... > > > I don't mind adding one more > > called trace(String message) if that would make the mapping concept > > more clear for you. > Well, no need I think; as trace is below debug and debug is > mapped to finest, there is no corresponding log level for trace. > > I'm satisfied with your explanations. Please just add a > LEVEL_DEBUG constant and I'm OK with your interface.
OK, I have added the constant LEVEL_DEBUG back, and have also added a new one called LEVEL_TRACE. PLEASE NOTE: LEVEL_DEBUG is now equal to LEVEL_FINER (it previously was equal to LEVEL_FINEST), and LEVEL_TRACE has been set equal to LEVEL_FINEST. These changes have been made to better accommodate what I understand the Commons Logging levels to be. This makes the Avalon mapping look like this: FINEST debug FINER debug FINE info CONFIG info INFO info WARNING warn SEVERE error Victor Mote