users@glassfish.java.net

Logging on glassfish.

From: <glassfish_at_javadesktop.org>
Date: Sat, 10 Feb 2007 14:49:03 PST

So I'm trying to log a problem in my app. However, I'm never seeing the output of

Logger.throwing(...) in my log files? Am I supposed to.

How I'm using it.

import java.util.logging.*;

public class DatabaseUtils {

        public static final Logger logger =
                Logger.getLogger(DatabaseUtils.class.getName() );



public static void begin() throws DatabaseException {

                logger.info("method begin(): beginning transaction");

                // Get the current UserTransaction
                UserTransaction ut = getUserTransaction();

                try {

                        // Begin the transaction
                        ut.begin();
                        logger.fine("transaction has commenced");

                } catch (Exception e) {

                        // Wrap the exception up in a DatabaseException
                        // I don't see this when it happens. but I do see the severe.
                        logger.throwing(DatabaseUtils.class.getName(), "begin", e);
                        logger.severe("exception beginning user transaction");
                        throw new DatabaseException(
                                              DatabaseException.ERROR_BEGINNING_USER_TRANSACTION, null, e);

                }

        }

}


What does logger.throwing log as as "severe?, info? other?
[Message sent by forum member 'tmonteit' (tmonteit)]

http://forums.java.net/jive/thread.jspa?messageID=203146