On Sun, Jan 10, 2010 at 6:42 PM, Emmanuel Lecharny <[email protected]> wrote:
> That raise a slight issue here : with slf4j, we have no way to tell the
> underlying framework that it should switch to some specific level, for
> instance. Quite a dead end, so far :/
As mentioned, I don't think this is in scope for MINA. If the user,
for example has chosen to use log4j, he would do this using the log4j
API (in which slf4j will create a logger). We do not need to care.
> The way it was done in MINA was awfull : the log level ws always set to
> debug, and we overriden this level with our own level :
>
> if ( requestedLevel == DEBUG ) {
> Log.debug( blah );
> }
Yes, I agree that it is unfortunate that slf4j do not provide a
generic log(Level, String) method in the same way as log4j. Given
Ceki's great knowledge in this area, I presume it's for good reasons.
However, another solution would be to allow the user to inject his own
logger into the logging filter.
/niklas