public class ExceptionUtils
public static int DEFAULT_MAX_NUMBER_ENTRIES
Default maximun number of entries.
public static void logStackTrace(java.lang.Exception exception,
org.apache.log4j.Logger logger)
This sends an exception's stack trace to the specified logger. The max parameter defines the maximun number of entries to send to the logger. This logs the default number of entries defined by DEFAULT_MAX_NUMBER_ENTRIES at the default priorty of debug.
exception - exception to loglogger - logger to send entriespublic static void logStackTrace(java.lang.Exception exception,
int max,
org.apache.log4j.Logger logger,
org.apache.log4j.Level priorty)
This sends an exception's stack trace to the specified logger. The max parameter defines the maximun number of entries to send to the logger. Setting max to a negative number sends all the entries in the stack track to the logger.
exception - exception to logmax - maximun number of entries to loglogger - logger to send entriespriorty - priorty of log messagepublic static java.lang.String getStackTrace(java.lang.Exception exception,
int max)
This sends an exception's stack trace to the specified logger. The max parameter defines the maximun number of entries to send to the logger. Setting max to a negative number sends all the entries in the stack track to the logger.
exception - exception to logmax - maximun number of entries to logpublic static void logExceptionCauses(java.lang.Throwable exception,
org.apache.log4j.Logger logger,
org.apache.log4j.Level priorty)
This sends an exception's cause history to the specified logger.
exception - exception to loglogger - logger to send entriespriorty - priorty of log messagepublic static java.lang.String getExceptionCauses(java.lang.Throwable exception)
This gets an exception's cause history. Only the message text is included (e.g. the exception's class names are not output).
exception - exception to logpublic static java.lang.String getExceptionCausesWithClassNames(java.lang.Throwable exception)
This gets an exception's cause history.
exception - exception to log