Hello,

I am currently specing out a core logging module for the Python language
which borrows from log4j. I would like to know if, in practice, people have
found the FATAL priority level of use in a language with exception handling
support.

The way I see it (not having the benefit of experience) the ERROR level is
useful for identifying errors in user input before terminating processing (or
stumbling along afterward). A FATAL problem is typically just an uncaught
exception -- and if the exception is uncaught there really seems no
appropriate to actually *log* the problem.

The only appropriate senario that I see is having one exception catch
block around my entire application which will log a FATAL error for any
unexpected exception.

    public class MyApp {
        static Logger logger = Logger.getLogger(MyApp.class);

        public static void main(String[] args) {
            try {
                return dostuff();
            } catch (Throwable t) {
                logger.fatal("Something really bad happened.");
            }
        }
    }

Are there other usage scenarios for which people have found FATAL to be
handy.

Thanks,
Trent


-- 
Trent Mick
[EMAIL PROTECTED]

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to