com.arsdigita.logging
Class ErrorReport
java.lang.Object
com.arsdigita.logging.ErrorReport
- Direct Known Subclasses:
- InitializerErrorReport, ServletErrorReport
- public class ErrorReport
- extends Object
Base class for handling error reports. Typical usage is:
try {
// something that goes wrong
} catch (Exception ex) {
ErrorReport report = new ErrorReport(ex);
report.logit();
throw ex;
}
- Author:
- Dan Berrange
- See Also:
- http://www.tuxedo.org/~esr/jargon/html/entry/guru-meditation.html
versionId
public static final String versionId
- See Also:
- Constant Field Values
ErrorReport
public ErrorReport(Throwable throwable)
initializeAppender
public static void initializeAppender(String directory)
getHostname
public String getHostname()
getGuruMeditationCode
public String getGuruMeditationCode()
- Returns the globally unique error code for this
error report. This can be used to identity the
entry in the log files upon recieving feedback
from the end user.
addSection
public void addSection(String name,
Collection lines)
addSection
public void addSection(String name,
String[] lines)
addSection
public void addSection(String name,
String line)
getReport
public String getReport()
toString
public String toString()
logit
public void logit()
- Writes a nicely formatted error report into the
log file.
Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC