If the application exits main doesn't your window disappear? If so you
have nothing to log.

If not then any exceptions would be caught in your catch clause.

Cheers,
Philip. 

-----Original Message-----
From: Cook, Lori A [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 21, 2006 11:22 AM
To: Log4J Users List
Subject: [BULK] Window apps and logging
Importance: Low

Okay

So you've got an application that creates a window application. The
class is something like this

public class TestPanels extends JFrame { // private class constants
        private static final Logger logger =
        
Logger.getLogger(TestPanels.class.getName());
    ...
    public static void main(String args[]) {
        logger.info("Entering main");
        try {
                new TestPanels().show();
        } catch (Exception e) {
                logger.error("", e);
        }
        logger.info("Exiting main");
    }
}

So you kick off the app, it posts a window and exits main. Now what? If
you cause an error in app where do you catch it and log? I.e. I'm
looking for the 'holy grail' of catching any unprocessed exceptions for
such a application so it can be logged.

Thanks for any help you can give.
Lori <*>



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

Reply via email to