de.lmu.ifi.dbs.elki.logging
Class ExceptionFormatter
java.lang.Object
java.util.logging.Formatter
de.lmu.ifi.dbs.elki.logging.ExceptionFormatter
public class ExceptionFormatter
- extends Formatter
A formatter to format exception messages.
- Author:
- Arthur Zimek
Field Summary |
private static boolean |
DEBUG
Holds the class specific debug status. |
Constructor Summary |
ExceptionFormatter()
Provides an exception formatter
for exception messages. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEBUG
private static final boolean DEBUG
- Holds the class specific debug status.
In this case, the status true is required
for complete view of exceptions.
If
DEBUG
is false
,
only the exception message is printed.
Otherwise, the user gets information
w.r.t. cause and stacktrace.
- See Also:
- Constant Field Values
ExceptionFormatter
public ExceptionFormatter()
- Provides an exception formatter
for exception messages.
format
public String format(LogRecord record)
- Exception messages are formatted dependent from the
debug mode as assigned by DEBUG.
- If debug mode is deactivated (i.e.
DEBUG=false
)
the regular user information will be provided:
i.e., the message of the LogEntry only.
- In debug mode, one more detailed
information is provided, as the name
of the causing exception and the stacktrace.
- Specified by:
format
in class Formatter
- See Also:
Formatter.format(java.util.logging.LogRecord)
getStackTrace
public String getStackTrace(LogRecord record)