public final class LoggingUtil extends Object
logExpensive(java.util.logging.Level, java.lang.String, java.lang.Throwable)
allows the programmer to easily emit a log message,
however the function is rather expensive and thus should not be used within
loop constructs.Constructor and Description |
---|
LoggingUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
exception(String message,
Throwable e)
Static version to log a severe exception.
|
static void |
exception(Throwable e)
Static version to log a severe exception.
|
private static String[] |
inferCaller()
Infer which class has called the logging helper.
|
static void |
logExpensive(Level level,
String message)
Expensive logging function that is convenient, but should only be used in
rare conditions.
|
static void |
logExpensive(Level level,
String message,
Throwable e)
Expensive logging function that is convenient, but should only be used in
rare conditions.
|
static void |
message(String message)
Static version to log a 'info' message.
|
static void |
message(String message,
Throwable e)
Static version to log a 'info' message.
|
static void |
parseDebugParameter(StringParameter param)
Parse the option string to configure logging.
|
static void |
warning(String message)
Static version to log a warning message.
|
static void |
warning(String message,
Throwable e)
Static version to log a warning message.
|
public static final void logExpensive(Level level, String message, Throwable e)
logging package documentation
.level
- Logging levelmessage
- Message to log.e
- Exception to report.public static final void logExpensive(Level level, String message)
logging package documentation
.level
- Logging levelmessage
- Message to log.public static final void exception(Throwable e)
e
- Exception to logpublic static final void exception(String message, Throwable e)
message
- Exception message, may be null (defaults to e.getMessage())e
- causing exceptionpublic static final void warning(String message)
message
- Warning message.public static final void warning(String message, Throwable e)
message
- Warning message, may be null (defaults to e.getMessage())e
- causing exceptionpublic static final void message(String message)
message
- Warning message.public static final void message(String message, Throwable e)
message
- Warning message, may be null (defaults to e.getMessage())e
- causing exceptionprivate static final String[] inferCaller()
public static final void parseDebugParameter(StringParameter param) throws WrongParameterValueException
param
- Parameter to process.WrongParameterValueException
- On parsing errors