river-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juan Ramirez (JIRA)" <j...@apache.org>
Subject [jira] Created: (RIVER-90) LogUtil should include a 'safe' log method
Date Fri, 27 Jul 2007 12:37:19 GMT
LogUtil should include a 'safe' log method
------------------------------------------

                 Key: RIVER-90
                 URL: https://issues.apache.org/jira/browse/RIVER-90
             Project: River
          Issue Type: New Feature
          Components: com_sun_jini_logging
    Affects Versions: jtsk_2.1
            Reporter: Juan Ramirez
            Priority: Minor


Bugtraq ID [6307070|http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6307070

>From John McClain:

/**
 * Logs an exception. Guaranteed not to throw anything.
 */
public static void log(Logger    logger, 
                       Leve l    level, 
                       String    msg,
                       Throwable thrown)
{
   try {
       logger.log(level, msg, thrown);
   } catch (Throwable t) {
       // Don't make it worse
   }
}

A safe version of logThrow (or maybe modifying logThrow itself?) could also be useful for
code that is currently using the logThrow method.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message