public class ErrorFileDumper extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ErrorFileDumper.HttpRequestData
Utility class to copy useful information from the HTTP request object, as we won't have access to it in
asynchronous threads.
|
| Modifier and Type | Field and Description |
|---|---|
static org.apache.commons.lang.time.FastDateFormat |
DATE_FORMAT_DIRECTORY |
static org.apache.commons.lang.time.FastDateFormat |
DATE_FORMAT_FILE |
| Constructor and Description |
|---|
ErrorFileDumper() |
| Modifier and Type | Method and Description |
|---|---|
static void |
dumpToFile(Throwable t,
javax.servlet.http.HttpServletRequest request) |
static StringWriter |
generateErrorReport(ErrorFileDumper.HttpRequestData requestData,
Throwable exception,
int previousExceptionOccurences,
Throwable previousException) |
static double |
getHighLoadBoundary() |
static int |
getMaximumTasksAllowed() |
protected static int |
getNestedExceptionDepth(Throwable t,
int curDepth) |
static boolean |
isFileDumpActivated() |
static boolean |
isHeapDumpSupported() |
static boolean |
isShutdown() |
static void |
outputSystemInfo(PrintWriter strOut) |
static void |
outputSystemInfo(PrintWriter strOut,
boolean systemProperties,
boolean jahiaSettings,
boolean memory,
boolean caches,
boolean threads,
boolean deadlocks,
boolean loadAverage) |
static void |
outputSystemInfo(PrintWriter strOut,
boolean systemProperties,
boolean environmentVariables,
boolean jahiaSettings,
boolean memory,
boolean caches,
boolean threads,
boolean deadlocks,
boolean loadAverage) |
static File |
performHeapDump() |
protected static String |
recursiveStackTraceToString(Throwable t,
int curDepth) |
static void |
setFileDumpActivated(boolean fileDumpActivated) |
static void |
setHighLoadBoundary(double highLoadBoundary)
Sets the boundary load value above which all reporting will automatically deactivate.
|
static void |
setMaximumTasksAllowed(int maximumTasksAllowed)
Sets the maximum number of parallel dumping tasks allowed to be queued.
|
static void |
shutdown() |
static void |
shutdown(long millisecondsToWait) |
protected static String |
stackTraceToString(Throwable t)
Converts an exception stack trace to a string, going doing into all
the embedded exceptions too to detail as much as possible the real
causes of the error.
|
static void |
start() |
public static final org.apache.commons.lang.time.FastDateFormat DATE_FORMAT_DIRECTORY
public static final org.apache.commons.lang.time.FastDateFormat DATE_FORMAT_FILE
public static void start()
public static void shutdown()
public static void shutdown(long millisecondsToWait)
public static boolean isShutdown()
public static void setFileDumpActivated(boolean fileDumpActivated)
public static boolean isFileDumpActivated()
public static void dumpToFile(Throwable t, javax.servlet.http.HttpServletRequest request) throws IOException
IOExceptionpublic static int getMaximumTasksAllowed()
public static void setMaximumTasksAllowed(int maximumTasksAllowed)
public static StringWriter generateErrorReport(ErrorFileDumper.HttpRequestData requestData, Throwable exception, int previousExceptionOccurences, Throwable previousException)
public static void outputSystemInfo(PrintWriter strOut)
public static double getHighLoadBoundary()
public static void setHighLoadBoundary(double highLoadBoundary)
highLoadBoundary - public static void outputSystemInfo(PrintWriter strOut, boolean systemProperties, boolean jahiaSettings, boolean memory, boolean caches, boolean threads, boolean deadlocks, boolean loadAverage)
public static void outputSystemInfo(PrintWriter strOut, boolean systemProperties, boolean environmentVariables, boolean jahiaSettings, boolean memory, boolean caches, boolean threads, boolean deadlocks, boolean loadAverage)
protected static String stackTraceToString(Throwable t)
t - the exception (eventually that contains other exceptions) for
which we want to convert the stack trace into a string.protected static String recursiveStackTraceToString(Throwable t, int curDepth)
protected static int getNestedExceptionDepth(Throwable t, int curDepth)
public static boolean isHeapDumpSupported()
throws MalformedObjectNameException
MalformedObjectNameExceptionpublic static File performHeapDump() throws MalformedObjectNameException, InstanceNotFoundException, ReflectionException, MBeanException
Copyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.