On 2/8/06, DeSantis, MJ Mark @ IS (7179) <[EMAIL PROTECTED]> wrote:
>
> is for nice, user-friendly, user-understandable, messages. So in other
> words
> if we, for instance, caught an exception and wanted the stacktrace to go
> to
> the file but we still wanted something for the user to show up in the
> window
> we would do something like this:
>
> }catch(Exception ex){
>         ourLogger.fatal("Problem in such-and-such a window: ", ex);
>         ourLogger.advisoryFatal("The window can not display because of
> xyz");
> }
>
>
> So that's pretty much the situation.
>
> Do you think refactoring to a less "extended" approach is a possibility.
>

At first glance, I'd propose using two loggers:

}catch(Exception ex){
        // traditional logger, with stack trace
        ourLogger.fatal("Problem in such-and-such a window: ", ex);
        // user friendly logger, with verbose messages and no stack trace
        ourAdvisoryLogger.fatal("The window can not display because of
xyz");
}

And then tweak the appenders configuration and such for "ourAdvisoryLogger"
to get the results you had with the extended Logger.

--
Javier González Nicolini

Reply via email to