|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.fatwire.gst.foundation.DebugHelper
public final class DebugHelper
Various helper methods for debugging.
Field Summary | |
---|---|
static String |
TIME_LOGGER
|
Method Summary | |
---|---|
static void |
dumpSSVars(COM.FutureTense.Interfaces.ICS ics,
PrintWriter pw)
|
static void |
dumpVars(COM.FutureTense.Interfaces.ICS ics)
|
static void |
dumpVars(COM.FutureTense.Interfaces.ICS ics,
org.apache.commons.logging.Log log)
|
static void |
dumpVars(COM.FutureTense.Interfaces.ICS ics,
PrintWriter pw)
|
static Throwable |
findRootCause(Throwable e)
Retrieves the root exception of a Throwable . |
static String |
microToHuman(long elapsed)
Converts an elapsed time in micro seconds to a human readable string with seconds and milliseconds precision on larger elapsed times. |
static String |
milliToHuman(long elapsed)
Converts an elapsed time in nano seconds to a human readable string with microseconds, seconds and milliseconds precision on larger elapsed times. |
static String |
nanoToHuman(long elapsed)
Converts an elapsed time in milli seconds to a human readable string with minutes and seconds precision on larger elapsed times. |
static String |
printAsset(com.fatwire.assetapi.data.AssetData ad)
Print the AssetData to a string for debugging purposes. |
static void |
printStackTrace(Writer writer,
Throwable t)
Prints the StackTrace of the Throwable to the Writer. |
static String |
printState(COM.FutureTense.Interfaces.ICS ics)
Dumps to current ICS state (Content Server variables, session variables,ICS objects,elementname,page url and stacktrace) as a String. |
static void |
printTime(org.apache.commons.logging.Log log,
String msg,
long start)
Print the elapsed time since the start to the provided Log. |
static void |
printTime(org.apache.commons.logging.Log log,
String msg,
long start,
long end)
Print the elapsed time between the start and end to the provided logger in a human readable form. |
static void |
printTime(String msg,
long start)
Print the elapsed time since the start to the default time logger TIME_LOGGER . |
static String |
toString(com.fatwire.assetapi.data.AssetId assetId)
Returns the assetid in as a human readable string in the format of type:id. |
static String |
toString(Throwable t)
Creates a String from the Throwable. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String TIME_LOGGER
Method Detail |
---|
public static void dumpVars(COM.FutureTense.Interfaces.ICS ics)
public static void dumpVars(COM.FutureTense.Interfaces.ICS ics, org.apache.commons.logging.Log log)
public static void dumpVars(COM.FutureTense.Interfaces.ICS ics, PrintWriter pw)
public static void dumpSSVars(COM.FutureTense.Interfaces.ICS ics, PrintWriter pw)
public static Throwable findRootCause(Throwable e)
Throwable
.
e
- the exception with nested exceptions (causes)
public static String microToHuman(long elapsed)
elapsed
- the elapsed time in micro seconds (us)
public static String milliToHuman(long elapsed)
elapsed
- the elapsed time in nano seconds (us)
public static String nanoToHuman(long elapsed)
elapsed
- the elapsed time in nano seconds (us)
public static void printTime(org.apache.commons.logging.Log log, String msg, long start, long end)
log
- The logger where the message will be printed to.msg
- The message as an indicator of the operation that was
monitored.start
- time in nanoseconds System.nanoTime()
end
- time in nanoseconds System.nanoTime()
microToHuman(long)
public static void printTime(org.apache.commons.logging.Log log, String msg, long start)
log
- The logger where the message will be printed to.msg
- The message as an indicator of the operation that was
monitored.start
- time in nanoseconds System.nanoTime()
microToHuman(long)
public static void printTime(String msg, long start)
TIME_LOGGER
.
msg
- The message as an indicator of the operation that was
monitored.start
- time in nanoseconds System.nanoTime()
microToHuman(long)
public static String printAsset(com.fatwire.assetapi.data.AssetData ad) throws com.fatwire.assetapi.common.AssetAccessException
ad
- the asset date
com.fatwire.assetapi.common.AssetAccessException
public static String toString(com.fatwire.assetapi.data.AssetId assetId)
assetId
- the asset id.
public static String toString(Throwable t)
t
- the throwable to print.
public static void printStackTrace(Writer writer, Throwable t)
writer
- writer to write to.t
- the Throwable to print the stacktrace of.public static String printState(COM.FutureTense.Interfaces.ICS ics)
ics
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |