public class Session extends Object
The Session class offers dozens of useful methods for sending any kind of data with the assistance of its parent. Sessions can send simple messages, warnings, errors and more complex things like pictures, objects, exceptions, system information and much more. They are even able to send variable watches, generate illustrated process and thread information or control the behavior of the SmartInspect Console. It is possible, for example, to clear the entire log in the Console by calling the clearLog method.
Please note that log methods of this class do nothing and return immediately if the session is currently inactive its parent is disabled or the log level is not sufficient.
This class is fully threadsafe.
| Modifier and Type | Field and Description |
|---|---|
static Color |
DEFAULT_COLOR |
| Constructor and Description |
|---|
Session(SmartInspect parent,
String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCheckpoint()
Overloaded.
|
void |
addCheckpoint(Level level)
Overloaded.
|
void |
addCheckpoint(Level level,
String name)
Overloaded.
|
void |
addCheckpoint(Level level,
String name,
String details)
Overloaded function.
|
void |
addCheckpoint(String name)
Overloaded.
|
void |
addCheckpoint(String name,
String details)
Increments the counter of a named checkpoint and
logs a message with the default log level and an optional
message.
|
void |
clearAll()
Resets the whole Console.
|
void |
clearAutoViews()
Clears all AutoViews in the Console.
|
void |
clearLog()
Clears all Log Entries in the Console.
|
void |
clearProcessFlow()
Clears all Process Flow entries in the Console.
|
void |
clearWatches()
Clears all Watches in the Console.
|
void |
decCounter(Level level,
String name)
Overloaded.
|
void |
decCounter(String name)
Overloaded.
|
void |
enterMethod(Level level,
Object instance,
String methodName)
Overloaded.
|
void |
enterMethod(Level level,
Object instance,
String methodNameFmt,
Object[] args)
Overloaded.
|
void |
enterMethod(Level level,
String methodName)
Overloaded.
|
void |
enterMethod(Level level,
String methodNameFmt,
Object[] args)
Overloaded.
|
void |
enterMethod(Object instance,
String methodName)
An overloaded method that enters a method using the default log level.
|
void |
enterMethod(Object instance,
String methodNameFmt,
Object[] args)
Overloaded.
|
void |
enterMethod(String methodName)
Overloaded.
|
void |
enterMethod(String methodNameFmt,
Object[] args)
Overloaded.
|
void |
enterProcess()
Overloaded.
|
void |
enterProcess(Level level)
Overloaded.
|
void |
enterProcess(Level level,
String processName)
Enters a new process by using a custom log level.
|
void |
enterProcess(Level level,
String processNameFmt,
Object[] args)
Overloaded.
|
void |
enterProcess(String processName)
Overloaded.
|
void |
enterProcess(String processNameFmt,
Object[] args)
Overloaded.
|
void |
enterThread(Level level,
String threadName)
Overloaded.
|
void |
enterThread(Level level,
String threadNameFmt,
Object[] args)
Overloaded.
|
void |
enterThread(String threadName)
Overloaded method.
|
void |
enterThread(String threadNameFmt,
Object[] args)
Overloaded.
|
Color |
getColor()
Returns the background color in the SmartInspect Console of this session.
|
Level |
getLevel()
Returns the log level of this Session object.
|
String |
getName()
Returns the session name used for Log Entries.
|
SmartInspect |
getParent()
Returns the parent of the session.
|
void |
incCounter(Level level,
String name)
Overloaded.
|
void |
incCounter(String name)
Overloaded.
|
boolean |
isActive()
Indicates if this session is currently active or not.
|
boolean |
isOn()
Overloaded.
|
boolean |
isOn(Level level)
Overloaded.
|
protected boolean |
isStored()
Returns if this session is stored in the session tracking list of its Parent.
|
void |
leaveMethod(Level level,
Object instance,
String methodName)
Overloaded.
|
void |
leaveMethod(Level level,
Object instance,
String methodNameFmt,
Object[] args)
Overloaded.
|
void |
leaveMethod(Level level,
String methodName)
Overloaded.
|
void |
leaveMethod(Level level,
String methodNameFmt,
Object[] args)
Overloaded.
|
void |
leaveMethod(Object instance,
String methodName)
Overloaded.
|
void |
leaveMethod(Object instance,
String methodNameFmt,
Object[] args)
Overloaded.
|
void |
leaveMethod(String methodName)
Overloaded.
|
void |
leaveMethod(String methodNameFmt,
Object[] args)
Overloaded.
|
void |
leaveProcess()
Overloaded.
|
void |
leaveProcess(Level level)
Overloaded.
|
void |
leaveProcess(Level level,
String processName)
Overloaded.
|
void |
leaveProcess(Level level,
String processNameFmt,
Object[] args)
Overloaded.
|
void |
leaveProcess(String processName)
Overloaded.
|
void |
leaveProcess(String processNameFmt,
Object[] args)
Overloaded.
|
void |
leaveThread(Level level,
String threadName)
Overloaded.
|
void |
leaveThread(Level level,
String threadNameFmt,
Object[] args)
Leaves a thread by using a custom log level.
|
void |
leaveThread(String threadName)
Overloaded.
|
void |
leaveThread(String threadNameFmt,
Object[] args)
Overloaded method.
|
void |
logArray(Level level,
String title,
Object[] array)
Overloaded.
|
void |
logArray(String title,
Object[] array)
Overloaded.
|
void |
logAssert(boolean condition,
String title)
Overloaded.
|
void |
logAssert(boolean condition,
String titleFmt,
Object[] args)
Overloaded.
|
void |
logAssigned(Level level,
String title,
Object instance)
Overloaded.
|
void |
logAssigned(String title,
Object instance)
Overloaded.
|
void |
logBinary(Level level,
String title,
byte[] b)
Overloaded.
|
void |
logBinary(Level level,
String title,
byte[] b,
int off,
int len)
Overloaded.
|
void |
logBinary(String title,
byte[] b)
Overloaded.
|
void |
logBinary(String title,
byte[] b,
int off,
int len)
Logs a byte array with the default log level and displays it in a hex viewer.
|
void |
logBinaryFile(Level level,
String fileName)
Overloaded.
|
void |
logBinaryFile(Level level,
String title,
String fileName)
Overloaded.
|
void |
logBinaryFile(String fileName)
Overloaded.
|
void |
logBinaryFile(String title,
String fileName)
Logs a binary file and displays its content in a hex
viewer using a custom title and default log level.
|
void |
logBinaryStream(Level level,
String title,
InputStream stream)
Overloaded.
|
void |
logBinaryStream(String title,
InputStream stream)
Overloaded.
|
void |
logBitmapFile(Level level,
String fileName)
Logs a bitmap file with a custom log level and displays it in the Console.
|
void |
logBitmapFile(Level level,
String title,
String fileName)
Overloaded.
|
void |
logBitmapFile(String fileName)
Logs a bitmap file with the default log level and
displays it in the Console.
|
void |
logBitmapFile(String title,
String fileName)
Overloaded.
|
void |
logBitmapStream(Level level,
String title,
InputStream stream)
Overloaded.
|
void |
logBitmapStream(String title,
InputStream stream)
Logs a stream with the default log level and interprets its content as a bitmap.
|
void |
logBoolean(Level level,
String name,
boolean value)
Overloaded.
|
void |
logBoolean(String name,
boolean value)
Logs a boolean value with the default log level.
|
void |
logByte(Level level,
String name,
byte value)
Overloaded.
|
void |
logByte(Level level,
String name,
byte value,
boolean includeHex)
This method logs the name and value of a byte variable.
|
void |
logByte(String name,
byte value)
Overloaded.
|
void |
logByte(String name,
byte value,
boolean includeHex)
Overloaded.
|
void |
logChar(Level level,
String name,
char value)
Overloaded.
|
void |
logChar(String name,
char value)
Overloaded method.
|
void |
logCollection(Level level,
String title,
Collection c)
Overloaded.
|
void |
logCollection(String title,
Collection c)
Overloaded.
|
void |
logColored(Color color,
String title)
Overloaded.
|
void |
logColored(Color color,
String titleFmt,
Object[] args)
Logs a colored message with the default log level.
|
void |
logColored(Level level,
Color color,
String title)
Overloaded.
|
void |
logColored(Level level,
Color color,
String titleFmt,
Object[] args)
Overloaded method that logs a colored message with a custom log level.
|
void |
logConditional(boolean condition,
String title)
Logs a conditional message with the default log level.
|
void |
logConditional(boolean condition,
String titleFmt,
Object[] args)
Overloaded.
|
void |
logConditional(Level level,
boolean condition,
String title)
Logs a conditional message with a custom log level.
|
void |
logConditional(Level level,
boolean condition,
String titleFmt,
Object[] args)
Logs a conditional message with a custom log level.
|
void |
logCurrentStackTrace()
Overloaded.
|
void |
logCurrentStackTrace(Level level)
Overloaded.
|
void |
logCurrentStackTrace(Level level,
String title)
Overloaded.
|
void |
logCurrentStackTrace(String title)
Overloaded.
|
void |
logCurrentThread()
Overloaded.
|
void |
logCurrentThread(Level level)
Logs information about the current thread with a custom log level.
|
void |
logCurrentThread(Level level,
String title)
Overloaded method that logs information about the current thread using a
custom title and a custom log level.
|
void |
logCurrentThread(String title)
Logs information about the current thread using a
custom title and the default log level.
|
void |
logCustomContext(Level level,
String title,
LogEntryType lt,
ViewerContext ctx)
Overloaded.
|
void |
logCustomContext(String title,
LogEntryType lt,
ViewerContext ctx)
Overloaded.
|
void |
logCustomFile(Level level,
String fileName,
LogEntryType lt,
ViewerId vi)
Overloaded.
|
void |
logCustomFile(Level level,
String title,
String fileName,
LogEntryType lt,
ViewerId vi)
Overloaded.
|
void |
logCustomFile(String fileName,
LogEntryType lt,
ViewerId vi)
Overloaded.
|
void |
logCustomFile(String title,
String fileName,
LogEntryType lt,
ViewerId vi)
Overloaded.
|
void |
logCustomReader(Level level,
String title,
Reader reader,
LogEntryType lt,
ViewerId vi)
Overloaded.
|
void |
logCustomReader(String title,
Reader reader,
LogEntryType lt,
ViewerId vi)
Logs the content of a reader using a custom Log Entry type, viewer ID and
default log level.
|
void |
logCustomStream(Level level,
String title,
InputStream stream,
LogEntryType lt,
ViewerId vi)
Overloaded.
|
void |
logCustomStream(String title,
InputStream stream,
LogEntryType lt,
ViewerId vi)
Logs the content of a stream using a custom Log Entry type, viewer ID and default log level.
|
void |
logCustomText(Level level,
String title,
String text,
LogEntryType lt,
ViewerId vi)
Logs a text using a custom Log Entry type, viewer ID and custom log level.
|
void |
logCustomText(String title,
String text,
LogEntryType lt,
ViewerId vi)
Overloaded.
|
void |
logDate(Level level,
String name,
Date value)
Overloaded.
|
void |
logDate(String name,
Date value)
Overloaded.
|
void |
logDebug(String title)
Overloaded.
|
void |
logDebug(String titleFmt,
Object[] args)
Overloaded.
|
void |
logDouble(Level level,
String name,
double value)
Overloaded.
|
void |
logDouble(String name,
double value)
Overloaded.
|
void |
logError(String title)
Overloaded.
|
void |
logError(String titleFmt,
Object[] args)
Logs an error message with a log level of Level.Error.
|
void |
logException(String title,
Throwable t)
Overloaded.
|
void |
logException(Throwable t)
Logs the content of an exception with a log level of Level.Error.
|
void |
logFatal(String title)
Overloaded method to log a fatal error message with a log level of Level.Fatal.
|
void |
logFatal(String titleFmt,
Object[] args)
Overloaded.
|
void |
logFloat(Level level,
String name,
float value)
Overloaded.
|
void |
logFloat(String name,
float value)
Overloaded.
|
void |
logHtml(Level level,
String title,
String html)
Overloaded.
|
void |
logHtml(String title,
String html)
Overloaded.
|
void |
logHtmlFile(Level level,
String fileName)
Overloaded.
|
void |
logHtmlFile(Level level,
String title,
String fileName)
Overloaded.
|
void |
logHtmlFile(String fileName)
Overloaded.
|
void |
logHtmlFile(String title,
String fileName)
Overloaded.
|
void |
logHtmlReader(Level level,
String title,
Reader reader)
Overloaded.
|
void |
logHtmlReader(String title,
Reader reader)
Overloaded.
|
void |
logHtmlStream(Level level,
String title,
InputStream stream)
Overloaded.
|
void |
logHtmlStream(String title,
InputStream stream)
Overloaded.
|
void |
logIconFile(Level level,
String fileName)
Overloaded.
|
void |
logIconFile(Level level,
String title,
String fileName)
Overloaded.
|
void |
logIconFile(String fileName)
Overloaded.
|
void |
logIconFile(String title,
String fileName)
Overloaded.
|
void |
logIconStream(Level level,
String title,
InputStream stream)
Logs a stream with a custom log level and interprets its content as Windows icon.
|
void |
logIconStream(String title,
InputStream stream)
Overloaded.
|
void |
logInt(Level level,
String name,
int value)
Overloaded.
|
void |
logInt(Level level,
String name,
int value,
boolean includeHex)
Overloaded.
|
void |
logInt(String name,
int value)
Overloaded.
|
void |
logInt(String name,
int value,
boolean includeHex)
Logs an integer value with an optional hexadecimal
representation and default log level.
|
protected void |
logInternalError(String title)
Logs an internal error with a log level of Level.Error.
|
protected void |
logInternalError(String titleFmt,
Object[] args)
Overloaded.
|
void |
logJpegFile(Level level,
String fileName)
Overloaded.
|
void |
logJpegFile(Level level,
String title,
String fileName)
Overloaded.
|
void |
logJpegFile(String fileName)
Overloaded.
|
void |
logJpegFile(String title,
String fileName)
Overloaded.
|
void |
logJpegStream(Level level,
String title,
InputStream stream)
Overloaded.
|
void |
logJpegStream(String title,
InputStream stream)
Overloaded.
|
void |
logLong(Level level,
String name,
long value)
Overloaded.
|
void |
logLong(Level level,
String name,
long value,
boolean includeHex)
Overloaded.
|
void |
logLong(String name,
long value)
Logs a long integer value with the default log level.
|
void |
logLong(String name,
long value,
boolean includeHex)
Overloaded.
|
void |
logMap(Level level,
String title,
Map map)
Logs the content of a map with a custom log level.
|
void |
logMap(String title,
Map map)
Overloaded.
|
void |
logMemoryStatistic()
Overloaded.
|
void |
logMemoryStatistic(Level level)
Overloaded.
|
void |
logMemoryStatistic(Level level,
String title)
Overloaded.
|
void |
logMemoryStatistic(String title)
Logs memory statistics about the virtual machine
using a custom title and default log level.
|
void |
logMessage(String title)
Overloaded.
|
void |
logMessage(String titleFmt,
Object[] args)
Overloaded.
|
void |
logMetafileFile(Level level,
String fileName)
Overloaded.
|
void |
logMetafileFile(Level level,
String title,
String fileName)
Overloaded.
|
void |
logMetafileFile(String fileName)
Overloaded.
|
void |
logMetafileFile(String title,
String fileName)
Logs a Windows Metafile file and displays it in the console using a custom title and default log level.
|
void |
logMetafileStream(Level level,
String title,
InputStream stream)
Overloaded.
|
void |
logMetafileStream(String title,
InputStream stream)
Overloaded.
|
void |
logObject(Level level,
String title,
Object instance)
Overloaded.
|
void |
logObject(Level level,
String title,
Object instance,
boolean nonPublic)
Overloaded.
|
void |
logObject(String title,
Object instance)
Overloaded.
|
void |
logObject(String title,
Object instance,
boolean nonPublic)
Overloaded method that logs fields of an object with the default log level.
|
void |
logObjectValue(Level level,
String name,
Object value)
Overloaded.
|
void |
logObjectValue(String name,
Object value)
Overloaded.
|
void |
logReader(Level level,
String title,
Reader reader)
Overloaded.
|
void |
logReader(String title,
Reader reader)
Overloaded.
|
void |
logResultSet(Level level,
String title,
ResultSet rset)
Overloaded method that logs the content of a ResultSet with a custom log level.
|
void |
logResultSet(String title,
ResultSet rset)
Logs the content of a ResultSet with the default log level.
|
void |
logResultSetMetaData(Level level,
String title,
ResultSet rset)
Overloaded.
|
void |
logResultSetMetaData(Level level,
String title,
ResultSetMetaData rmeta)
Overloaded.
|
void |
logResultSetMetaData(String title,
ResultSet rset)
Overloaded.
|
void |
logResultSetMetaData(String title,
ResultSetMetaData rmeta)
Overloaded method that logs the metadata of a ResultSet with the default log level.
|
void |
logSeparator()
Overloaded.
|
void |
logSeparator(Level level)
Overloaded.
|
void |
logShort(Level level,
String name,
short value)
Overloaded.
|
void |
logShort(Level level,
String name,
short value,
boolean includeHex)
Overloaded.
|
void |
logShort(String name,
short value)
Overloaded.
|
void |
logShort(String name,
short value,
boolean includeHex)
Overloaded.
|
void |
logSource(Level level,
String title,
String source,
SourceId id)
Overloaded method, logs source code that is displayed with syntax highlighting in the Console using a custom log level.
|
void |
logSource(String title,
String source,
SourceId id)
Overloaded.
|
void |
logSourceFile(Level level,
String fileName,
SourceId id)
Overloaded.
|
void |
logSourceFile(Level level,
String title,
String fileName,
SourceId id)
Overloaded.
|
void |
logSourceFile(String fileName,
SourceId id)
Overloaded.
|
void |
logSourceFile(String title,
String fileName,
SourceId id)
Overloaded.
|
void |
logSourceReader(Level level,
String title,
Reader reader,
SourceId id)
Overloaded.
|
void |
logSourceReader(String title,
Reader reader,
SourceId id)
Overloaded.
|
void |
logSourceStream(Level level,
String title,
InputStream stream,
SourceId id)
Overloaded.
|
void |
logSourceStream(String title,
InputStream stream,
SourceId id)
Overloaded.
|
void |
logSql(Level level,
String title,
String source)
Overloaded.
|
void |
logSql(String title,
String source)
Overloaded.
|
void |
logStream(Level level,
String title,
InputStream stream)
Overloaded.
|
void |
logStream(String title,
InputStream stream)
Logs the content of a binary stream with the default log level.
|
void |
logString(Level level,
String name,
String value)
Overloaded.
|
void |
logString(String name,
String value)
Overloaded.
|
void |
logStringBuffer(Level level,
String title,
StringBuffer sb)
Overloaded.
|
void |
logStringBuffer(String title,
StringBuffer sb)
Overloaded method, logs the content of a StringBuffer instance with the
default log level.
|
void |
logSystem()
Logs information about the system with the default log level.
|
void |
logSystem(Level level)
Logs information about the system with a custom log level.
|
void |
logSystem(Level level,
String title)
Overloaded.
|
void |
logSystem(String title)
Overloaded.
|
void |
logText(Level level,
String title,
String text)
Overloaded.
|
void |
logText(String title,
String text)
Logs a string with the default log level and displays it in a read-only text field.
|
void |
logTextFile(Level level,
String fileName)
Overloaded.
|
void |
logTextFile(Level level,
String title,
String fileName)
Overloaded.
|
void |
logTextFile(String fileName)
Overloaded.
|
void |
logTextFile(String title,
String fileName)
Overloaded.
|
void |
logTextReader(Level level,
String title,
Reader reader)
Overloaded.
|
void |
logTextReader(String title,
Reader reader)
Overloaded method.
|
void |
logTextStream(Level level,
String title,
InputStream stream)
Logs a stream with a custom log level and displays
the content in a read-only text field.
|
void |
logTextStream(String title,
InputStream stream)
Overloaded.
|
void |
logThread(Level level,
String title,
Thread thread)
Overloaded.
|
void |
logThread(String title,
Thread thread)
This method logs information about the supplied thread.
|
void |
logValue(Level level,
String name,
boolean value)
Overloaded.
|
void |
logValue(Level level,
String name,
byte value)
Overloaded.
|
void |
logValue(Level level,
String name,
char value)
Logs the name and value of a char variable with a custom log level.
|
void |
logValue(Level level,
String name,
Date value)
Overloaded.
|
void |
logValue(Level level,
String name,
double value)
Overloaded.
|
void |
logValue(Level level,
String name,
float value)
Overloaded.
|
void |
logValue(Level level,
String name,
int value)
Overloaded.
|
void |
logValue(Level level,
String name,
long value)
Overloaded.
|
void |
logValue(Level level,
String name,
Object value)
Logs the name and value of an object with a custom log level.
|
void |
logValue(Level level,
String name,
short value)
Overloaded.
|
void |
logValue(Level level,
String name,
String value)
Overloaded method that logs the name and value of a string variable
with a custom log level.
|
void |
logValue(String name,
boolean value)
Overloaded.
|
void |
logValue(String name,
byte value)
Overloaded.
|
void |
logValue(String name,
char value)
Overloaded.
|
void |
logValue(String name,
Date value)
Overloaded.
|
void |
logValue(String name,
double value)
Overloaded.
|
void |
logValue(String name,
float value)
Logs the name and value of a float variable with the default log level.
|
void |
logValue(String name,
int value)
Logs the name and value of an integer variable with the default log level.
|
void |
logValue(String name,
long value)
Overloaded.
|
void |
logValue(String name,
Object value)
Overloaded.
|
void |
logValue(String name,
short value)
Overloaded.
|
void |
logValue(String name,
String value)
Logs the name and value of a string variable with
the default log level.
|
void |
logVerbose(String title)
Overloaded method.
|
void |
logVerbose(String titleFmt,
Object[] args)
Overloaded.
|
void |
logWarning(String title)
Overloaded.
|
void |
logWarning(String titleFmt,
Object[] args)
Overloaded.
|
void |
resetCallstack()
Resets the call stack by using the default log level.
|
void |
resetCallstack(Level level)
Overloaded.
|
void |
resetCheckpoint()
Overloaded.
|
void |
resetCheckpoint(String name)
Overloaded.
|
void |
resetColor()
Resets the session color to its default value.
|
void |
resetCounter(String name)
Resets a named counter to its initial value of 0.
|
void |
sendCustomControlCommand(ControlCommandType ct,
byte[] data)
Overloaded.
|
void |
sendCustomControlCommand(Level level,
ControlCommandType ct,
byte[] data)
Overloaded.
|
void |
sendCustomLogEntry(Level level,
String title,
LogEntryType lt,
ViewerId vi,
byte[] data)
Overloaded.
|
void |
sendCustomLogEntry(String title,
LogEntryType lt,
ViewerId vi,
byte[] data)
Overloaded.
|
void |
sendCustomProcessFlow(Level level,
String title,
ProcessFlowType pt)
Overloaded.
|
void |
sendCustomProcessFlow(String title,
ProcessFlowType pt)
Overloaded.
|
void |
sendCustomWatch(Level level,
String name,
String value,
WatchType wt)
Overloaded method.
|
void |
sendCustomWatch(String name,
String value,
WatchType wt)
Overloaded.
|
void |
setActive(boolean active)
Specifies if the session is currently active.
|
void |
setColor(Color color)
Sets the background color in the SmartInspect Console of this session.
|
void |
setLevel(Level level)
Sets the log level of this Session object.
|
void |
setName(String name)
Sets the session name used for Log Entries.
|
protected void |
setStored(boolean stored)
Indicates if this session is stored in the session tracking
list of its Parent.
|
void |
watch(Level level,
String name,
boolean value)
Overloaded.
|
void |
watch(Level level,
String name,
byte value)
Overloaded.
|
void |
watch(Level level,
String name,
char value)
Overloaded.
|
void |
watch(Level level,
String name,
Date value)
Overloaded.
|
void |
watch(Level level,
String name,
double value)
Logs a double Watch with a custom log level.
|
void |
watch(Level level,
String name,
float value)
Overloaded.
|
void |
watch(Level level,
String name,
int value)
Overloaded.
|
void |
watch(Level level,
String name,
long value)
Overloaded.
|
void |
watch(Level level,
String name,
Object value)
Overloaded.
|
void |
watch(Level level,
String name,
short value)
Overloaded.
|
void |
watch(Level level,
String name,
String value)
Overloaded.
|
void |
watch(String name,
boolean value)
Overloaded.
|
void |
watch(String name,
byte value)
This method just calls the watchByte method.
|
void |
watch(String name,
char value)
Overloaded.
|
void |
watch(String name,
Date value)
Overloaded.
|
void |
watch(String name,
double value)
Overloaded.
|
void |
watch(String name,
float value)
Overloaded.
|
void |
watch(String name,
int value)
Overloaded method that logs an integer Watch with the default log
level.
|
void |
watch(String name,
long value)
Overloaded.
|
void |
watch(String name,
Object value)
Overloaded.
|
void |
watch(String name,
short value)
Overloaded.
|
void |
watch(String name,
String value)
Overloaded.
|
void |
watchBoolean(Level level,
String name,
boolean value)
Overloaded.
|
void |
watchBoolean(String name,
boolean value)
Logs a boolean Watch with the default log level.
|
void |
watchByte(Level level,
String name,
byte value)
Overloaded.
|
void |
watchByte(Level level,
String name,
byte value,
boolean includeHex)
Overloaded.
|
void |
watchByte(String name,
byte value)
Overloaded.
|
void |
watchByte(String name,
byte value,
boolean includeHex)
Overloaded.
|
void |
watchChar(Level level,
String name,
char value)
Overloaded.
|
void |
watchChar(String name,
char value)
Logs a char Watch with the default log level.
|
void |
watchDate(Level level,
String name,
Date value)
Overloaded.
|
void |
watchDate(String name,
Date value)
Overloaded.
|
void |
watchDouble(Level level,
String name,
double value)
Logs a double Watch with a custom log level.
|
void |
watchDouble(String name,
double value)
Logs a double Watch with the default log level.
|
void |
watchFloat(Level level,
String name,
float value)
Overloaded.
|
void |
watchFloat(String name,
float value)
Overloaded.
|
void |
watchInt(Level level,
String name,
int value)
Overloaded.
|
void |
watchInt(Level level,
String name,
int value,
boolean includeHex)
Logs an integer Watch with an optional hexadecimal representation and custom log level.
|
void |
watchInt(String name,
int value)
Overloaded method.
|
void |
watchInt(String name,
int value,
boolean includeHex)
Overloaded.
|
void |
watchLong(Level level,
String name,
long value)
Overloaded.
|
void |
watchLong(Level level,
String name,
long value,
boolean includeHex)
Overloaded.
|
void |
watchLong(String name,
long value)
Overloaded.
|
void |
watchLong(String name,
long value,
boolean includeHex)
Overloaded method.
|
void |
watchObject(Level level,
String name,
Object value)
Overloaded.
|
void |
watchObject(String name,
Object value)
Overloaded.
|
void |
watchShort(Level level,
String name,
short value)
Overloaded.
|
void |
watchShort(Level level,
String name,
short value,
boolean includeHex)
Overloaded.
|
void |
watchShort(String name,
short value)
Overloaded.
|
void |
watchShort(String name,
short value,
boolean includeHex)
Overloaded.
|
void |
watchString(Level level,
String name,
String value)
Overloaded.
|
void |
watchString(String name,
String value)
Overloaded.
|
public static final Color DEFAULT_COLOR
public Session(SmartInspect parent, String name)
protected boolean isStored()
See the SmartInspect.getSession and SmartInspect.addSession methods for more information about session tracking.
protected void setStored(boolean stored)
stored - True if this session is stored in the session tracking list
and false otherwisepublic void setName(String name)
name - The new session namepublic String getName()
public void setActive(boolean active)
active - A boolean value to activate or deactivate this instancepublic boolean isActive()
public Level getLevel()
Each Session object can have its own log level. A log message is only logged if its log level is greater than or equal to the log level of a session and the session's parent. Log levels can thus be used to limit the logging output to important messages only.
public void setLevel(Level level)
getParent().
Log levels can thus be used to limit the logging output to
important messages only.
This method does nothing if the level parameter is null.
level - The new log level for this session.public boolean isOn(Level level)
This method is used by the logging methods in this class to determine if information should be logged or not. When extending the Session class by adding new log methods to a derived class, it is recommended to call this method first. This method returns false if the supplied level argument is null.
level - The log level to check forpublic boolean isOn()
This method is used by the logging methods in this class to determine if information should be logged or not. When extending the Session class by adding new log methods to a derived class it is recommended to call this method first.
public SmartInspect getParent()
The parent of a session is a SmartInspect instance. It is
responsible for sending the packets to the SmartInspect
Console or for writing them to a file. If the parent is not
SmartInspect.setEnabled(boolean), enabled, all logging methods
of this class will return immediately and do nothing.
public void setColor(Color color)
color - The new background colorpublic Color getColor()
The session color helps you to identify Log Entries from different sessions in the SmartInspect Console by changing the background color.
public void resetColor()
The default color of a session is transparent.
public void logSeparator()
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
addCheckpoint()public void logSeparator(Level level)
addCheckpoint()
for a method with a similar intention.level - The log level of this method calladdCheckpoint()public void resetCallstack()
This method instructs the Console to reset the call stack generated by the EnterMethod and LeaveMethod methods. It is especially useful if you want to reset the indentation in the method hierarchy without clearing all Log Entries.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
public void resetCallstack(Level level)
level - The log level of this method callpublic void enterMethod(String methodName)
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
methodName - The name of the methodpublic void enterMethod(Level level, String methodName)
level - The log level of this method callmethodName - The name of the methodpublic void enterMethod(String methodNameFmt, Object[] args)
The enterMethod method notifies the Console that a new method has been entered. The Console includes the method in the method hierarchy. If this method is used consequently, a full call stack is visible in the Console which helps to locate bugs in the source code. Please see the leaveMethod method as the counter piece to enterMethod.
The resulting method name consists of a format string and the related array of arguments.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
methodNameFmt - The format string to create the name of the methodargs - The array of arguments for the format stringpublic void enterMethod(Level level, String methodNameFmt, Object[] args)
The enterMethod method notifies the Console that a new method has been entered. The Console includes the method in the method hierarchy. If this method is used consequently, a full call stack is visible in the Console which helps to locate bugs in the source code. Please see the leaveMethod method as the counter piece to enterMethod.
The resulting method name consists of a format string and the related array of arguments.
level - The log level of this method callmethodNameFmt - The format string to create the name of the methodargs - The array of arguments for the format stringpublic void enterMethod(Object instance, String methodName)
The enterMethod method notifies the Console that a new method has been entered. The Console includes the method in the method hierarchy. If this method is used consequently, a full call stack is visible in the Console which helps to locate bugs in the source code. Please see the leaveMethod method as the counter piece to enterMethod.
The resulting method name consists of the class name of the supplied instance parameter, followed by a dot and the supplied methodName argument.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
methodName - The name of the methodinstance - The class name of this instance and a dot will be prepended
to the method namepublic void enterMethod(Level level, Object instance, String methodName)
The enterMethod method notifies the Console that a new method has been entered. The Console includes the method in the method hierarchy. If this method is used consequently, a full call stack is visible in the Console which helps to locate bugs in the source code. Please see the leaveMethod method as the counter piece to enterMethod.
The resulting method name consists of the class name of the supplied instance parameter, followed by a dot and the supplied methodName argument.
level - The log level of this method callmethodName - The name of the methodinstance - The class name of this instance and a dot will be prepended to the method namepublic void enterMethod(Object instance, String methodNameFmt, Object[] args)
The enterMethod method notifies the Console that a new method has been entered. The Console includes the method in the method hierarchy. If this method is used consequently, a full call stack is visible in the Console which helps to locate bugs in the source code. Please see the leaveMethod method as the counter piece to enterMethod.
The resulting method name consists of the class name of the supplied instance parameter, followed by a dot and the supplied format string and its related array of arguments.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
instance - The class name of this instance and a dot will be prepended to the method namemethodNameFmt - The format string to create the name of the methodargs - The array of arguments for the format stringpublic void enterMethod(Level level, Object instance, String methodNameFmt, Object[] args)
The enterMethod method notifies the Console that a new method has been entered. The Console includes the method in the method hierarchy. If this method is used consequently, a full call stack is visible in the Console which helps to locate bugs in the source code. Please see the leaveMethod method as the counter piece to enterMethod.
The resulting method name consists of the class name of the supplied instance parameter, followed by a dot and the supplied format string and its related array of arguments.
level - The log level of this method callinstance - The class name of this instance and a dot will be prepended
to the method namemethodNameFmt - The format string to create the name of the methodargs - The array of arguments for the format stringpublic void leaveMethod(String methodName)
The leaveMethod method notifies the Console that a method has been left. The Console closes the current method in the method hierarchy. If this method is used consequently, a full call stack is visible in the Console which helps to locate bugs in the source code. Please see the enterMethod method as the counter piece to leaveMethod.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
methodName - The name of the methodpublic void leaveMethod(Level level, String methodName)
The leaveMethod method notifies the Console that a method has been left. The Console closes the current method in the method hierarchy. If this method is used consequently, a full call stack is visible in the Console which helps to locate bugs in the source code. Please see the enterMethod method as the counter piece to leaveMethod.
level - The log level of this method callmethodName - The name of the methodpublic void leaveMethod(String methodNameFmt, Object[] args)
The leaveMethod method notifies the Console that a method has been left. The Console closes the current method in the method hierarchy. If this method is used consequently, a full call stack is visible in the Console which helps to locate bugs in the source code. Please see the enterMethod method as the counter piece to leaveMethod.
The resulting method name consists of a format string and the related array of arguments.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
methodNameFmt - The format string to create the name of the methodargs - The array of arguments for the format stringpublic void leaveMethod(Level level, String methodNameFmt, Object[] args)
The leaveMethod method notifies the Console that a method has been left. The Console closes the current method in the method hierarchy. If this method is used consequently, a full call stack is visible in the Console which helps to locate bugs in the source code. Please see the enterMethod method as the counterpart to leaveMethod.
The resulting method name consists of a format string and the related array of arguments.
level - The log level of this method callmethodNameFmt - The format string to create the name of the methodargs - The array of arguments for the format stringpublic void leaveMethod(Object instance, String methodName)
The leaveMethod method notifies the Console that a method has been left. The Console closes the current method in the method hierarchy. If this method is used consequently, a full call stack is visible in the Console which helps to locate bugs in the source code. Please see the enterMethod method as the counter piece to leaveMethod.
The resulting method name consists of the class name of the supplied instance parameter, followed by a dot and the supplied methodName argument.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
instance - The class name of this instance and a dot will be prepended
to the method namemethodName - The name of the methodpublic void leaveMethod(Level level, Object instance, String methodName)
The leaveMethod method notifies the Console that a method has been left. The Console closes the current method in the method hierarchy. If this method is used consequently, a full call stack is visible in the Console which helps to locate bugs in the source code. Please see the enterMethod method as the counter piece to leaveMethod.
The resulting method name consists of the class name of the supplied instance parameter, followed by a dot and the supplied methodName argument.
level - The log level of this method callinstance - The class name of this instance and a dot will be prepended
to the method namemethodName - The name of the methodpublic void leaveMethod(Object instance, String methodNameFmt, Object[] args)
The leaveMethod method notifies the Console that a method has been left. The Console closes the current method in the method hierarchy. If this method is used consequently, a full call stack is visible in the Console which helps to locate bugs in the source code. Please see the enterMethod method as the counter piece to leaveMethod.
The resulting method name consists of the class name of the supplied instance parameter, followed by a dot and the supplied format string and its related array of arguments.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
instance - The class name of this instance and a dot will be prepended to the method namemethodNameFmt - The format string to create the name of the methodargs - The array of arguments for the format stringpublic void leaveMethod(Level level, Object instance, String methodNameFmt, Object[] args)
The leaveMethod method notifies the Console that a method has been left. The Console closes the current method in the method hierarchy. If this method is used consequently, a full call stack is visible in the Console which helps to locate bugs in the source code. Please see the enterMethod method as the counter piece to leaveMethod.
The resulting method name consists of the class name of the supplied instance parameter, followed by a dot and the supplied format string and its related array of arguments.
level - The log level of this method callinstance - The class name of this instance and a dot will be prepended
to the method namemethodNameFmt - The format string to create the name of the methodargs - The array of arguments for the format stringpublic void enterThread(String threadName)
The enterThread method notifies the Console that a new thread has been entered. The Console display this thread in the Process Flow toolbox. If this method is used consequently, all threads of a process are displayed. Please see the leaveThread method as the counter piece to enterThread.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
threadName - The name of the threadpublic void enterThread(Level level, String threadName)
The enterThread method notifies the Console that a new thread has been entered. The Console display this thread in the Process Flow toolbox. If this method is used consequently, all threads of a process are displayed. Please see the leaveThread method as the counter piece to enterThread.
level - The log level of this method callthreadName - The name of the threadpublic void enterThread(String threadNameFmt, Object[] args)
The enterThread method notifies the Console that a new thread has been entered. The Console display this thread in the Process Flow toolbox. If this method is used consequently, all threads of a process are displayed. Please see the leaveThread method as the counter piece to enterThread.
The resulting thread name consists of a format string and the related array of arguments.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
threadNameFmt - The format string to create the name of the threadargs - The array of arguments for the format stringpublic void enterThread(Level level, String threadNameFmt, Object[] args)
The enterThread method notifies the Console that a new thread has been entered. The Console display this thread in the Process Flow toolbox. If this method is used consequently, all threads of a process are displayed. Please see the leaveThread method as the counter piece to enterThread.
The resulting thread name consists of a format string and the related array of arguments.
level - The log level of this method callthreadNameFmt - The format string to create the name of the threadargs - The array of arguments for the format stringpublic void leaveThread(String threadName)
The leaveThread method notifies the Console that a thread has been finished. The Console display this change in the Process Flow toolbox. Please see the enterThread method as the counter piece to leaveThread.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
threadName - The name of the threadpublic void leaveThread(Level level, String threadName)
level - The log level of this method callthreadName - The name of the threadpublic void leaveThread(String threadNameFmt, Object[] args)
The leaveThread method notifies the Console that a thread has been finished. The Console displays this change in the Process Flow toolbox. Please see the enterThread method as the counterpart to leaveThread.
The resulting thread name consists of a format string and the related array of arguments.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
threadNameFmt - The format string to create the name of the threadargs - The array of arguments for the format stringpublic void leaveThread(Level level, String threadNameFmt, Object[] args)
The leaveThread method notifies the Console that a thread has been finished. The Console display this change in the Process Flow toolbox. Please see the enterThread method as the counter piece to leaveThread.
The resulting thread name consists of a format string and the related array of arguments.
level - The log level of this method callthreadNameFmt - The format string to create the name of the threadargs - The array of arguments for the format stringpublic void enterProcess()
The enterProcess method notifies the Console that a new process has been entered. The Console displays this process in the Process Flow toolbox. Please see the leaveProcess method as the counter piece to enterProcess.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
public void enterProcess(Level level)
level - The log level of this method callpublic void enterProcess(String processName)
The enterProcess method notifies the Console that a new process has been entered. The Console displays this process in the Process Flow toolbox. Please see the leaveProcess method as the counter piece to enterProcess.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
processName - The name of the processpublic void enterProcess(Level level, String processName)
level - log levelprocessName - The name of the processpublic void enterProcess(String processNameFmt, Object[] args)
The enterProcess method notifies the Console that a new process has been entered. The Console displays this process in the Process Flow toolbox. Please see the leaveProcess method as the counter piece to enterProcess.
The resulting process name consists of a format string and the related array of arguments.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
processNameFmt - The format string to create the name of the processargs - The array of arguments for the format stringpublic void enterProcess(Level level, String processNameFmt, Object[] args)
level - The log level of this method callprocessNameFmt - The format string to create the name of the processargs - The array of arguments for the format stringpublic void leaveProcess()
The leaveProcess method notifies the Console that a process has finished. The Console displays this change in the Process Flow toolbox. Please see the enterProcess method as the counter piece to leaveProcess.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
public void leaveProcess(Level level)
level - The log level of this method callpublic void leaveProcess(String processName)
The leaveProcess method notifies the Console that a process has finished. The Console displays this change in the Process Flow toolbox. Please see the enterProcess method as the counter piece to leaveProcess.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
processName - The name of the processpublic void leaveProcess(Level level, String processName)
level - The log level of this method callprocessName - The name of the processpublic void leaveProcess(String processNameFmt, Object[] args)
The leaveProcess method notifies the Console that a process has finished. The Console displays this change in the Process Flow toolbox. Please see the enterProcess method as the counter piece to leaveProcess.
The resulting process name consists of a format string and the related array of arguments.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
processNameFmt - The format string to create the name of the processargs - The array of arguments for the format stringpublic void leaveProcess(Level level, String processNameFmt, Object[] args)
The leaveProcess method notifies the Console that a process has finished. The Console displays this change in the Process Flow toolbox. Please see the enterProcess method as the counter piece to leaveProcess.
The resulting process name consists of a format string and the related array of arguments.
level - The log level of this method callprocessNameFmt - The format string to create the name of the processargs - The array of arguments for the format stringpublic void logColored(Color color, String title)
This method uses the SmartInspect.setDefaultLevel(com.gurock.smartinspect.Level)
of the session's getParent() as log
level. For more information, please refer to the documentation of
the SmartInspect.setDefaultLevel(com.gurock.smartinspect.Level) method
of the SmartInspect class.
color - The background color in the Consoletitle - The message to logpublic void logColored(Level level, Color color, String title)
level - The log level of this method callcolor - The background color in the Consoletitle - The message to logpublic void logColored(Color color, String titleFmt, Object[] args)
This version of the method accepts a format string and a related array of arguments. These parameters will be passed to the MessageFormat.format() method and the resulting string will be the message.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
color - The background color in the ConsoletitleFmt - A format string to create the messageargs - The array of arguments for the format stringpublic void logColored(Level level, Color color, String titleFmt, Object[] args)
This version of the method accepts a format string and a related array of arguments. These parameters will be passed to the MessageFormat.format method and the resulting string will be the message.
level - The log level of this method callcolor - The background color in the ConsoletitleFmt - A format string to create the messageargs - The array of arguments for the format stringpublic void logDebug(String title)
title - The message to log.public void logDebug(String titleFmt, Object[] args)
titleFmt - A format string to create the messageargs - The array of arguments for the format stringpublic void logVerbose(String title)
title - The message to logpublic void logVerbose(String titleFmt, Object[] args)
titleFmt - A format string to create the messageargs - The array of arguments for the format stringpublic void logMessage(String title)
title - The message to logpublic void logMessage(String titleFmt, Object[] args)
titleFmt - A format string to create the messageargs - The array of arguments for the format stringpublic void logWarning(String title)
title - The warning to logpublic void logWarning(String titleFmt, Object[] args)
This version of the method accepts a format string and a related array of arguments. These parameters will be passed to the MessageFormat.format() method and the resulting string will be the warning message.
titleFmt - A format string to create the warningargs - The array of arguments for the format stringpublic void logError(String title)
title - A string which describes the errorpublic void logError(String titleFmt, Object[] args)
titleFmt - A format string to create a description of the errorargs - The array of arguments for the format stringpublic void logFatal(String title)
This method is ideally used in error handling code such as exception handlers. If this method is used consequently, it is easy to troubleshoot and solve bugs in applications or configurations. See logError for a method which does not describe fatal but recoverable errors.
title - A string which describes the fatal errorpublic void logFatal(String titleFmt, Object[] args)
This version of the method accepts a format string and a related array of arguments. These parameters will be passed to the MessageFormat.format method and the resulting string will be the fatal error message.
This method is ideally used in error handling code such as exception handlers. If this method is used consequently, it is easy to troubleshoot and solve bugs in applications or configurations. See logError for a method which does not describe fatal but recoverable errors.
titleFmt - A format string to create a description of the fatal errorargs - The array of arguments for the format stringprotected void logInternalError(String title)
This method is also intended to be used in derived classes to report any errors in your own methods.
title - A string which describes the internal errorprotected void logInternalError(String titleFmt, Object[] args)
This method logs an internal error. Such errors can occur if session methods are invoked with invalid arguments. For example, if you pass an invalid format string to logMessage, the exception will be caught and an internal error with the exception message will be sent.
This version of the method accepts a format string and a related array of arguments. These parameters will be passed to the MessageFormat.format method and the resulting string will be the error message.
This method is also intended to be used in derived classes to report any errors in your own methods.
titleFmt - A format string to create a description of the internal errorargs - The array of arguments for the format stringpublic void addCheckpoint()
resetCheckpoint() method
to reset the counter to 0 again.
This method is useful, for example, for tracking loops. If addCheckpoint is called for each iteration of a loop, it is easy
to follow the execution of the loop in question. This method can also be used in recursive methods to understand the execution flow.
Furthermore, you can use it to highlight important parts of your code. See logSeparator() for a method with a similar intention.
This method uses the SmartInspect.setDefaultLevel, default level of the session's parent as the log level. For more information,
please refer to the documentation of the SmartInspect.setDefaultLevel, setDefaultLevel method of the SmartInspect class.
Please refer to logSeparator(), resetCheckpoint()public void addCheckpoint(Level level)
This method increments a checkpoint counter and then logs a message using "Checkpoint #N" as title.
The initial value of the checkpoint counter is 0. You can use the resetCheckpoint()
method to reset the counter to 0 again.
This method is useful, for example, for tracking loops. If addCheckpoint is called for each iteration of a
loop, it is easy to follow the execution of the loop in question. This method can also be used in recursive
methods to understand the execution flow. Furthermore, you can use it to highlight important parts of your
code. See logSeparator() for a method with a similar intention.
level - The log level of this method calllogSeparator()public void addCheckpoint(String name)
This method increments the counter for the given checkpoint and then logs a message using "%checkpoint% #N" as title where %checkpoint% stands for the name of the checkpoint and N for the incremented counter value. The initial value of the counter for a given checkpoint is 0. You can use the resetCheckpoint method to reset the counter to 0 again.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
name - The name of the checkpoint to incrementpublic void addCheckpoint(Level level, String name)
This method increments the counter for the given checkpoint and then logs a message using "%checkpoint% #N" as title where %checkpoint% stands for the name of the checkpoint and N for the incremented counter value. The initial value of the counter for a given checkpoint is 0. You can use the resetCheckpoint method to reset the counter to 0 again.
level - The log level of this method callname - The name of the checkpoint to incrementpublic void addCheckpoint(String name, String details)
name - The name of the checkpoint to incrementdetails - An optional message to include in the resulting log entry. Can be nullpublic void addCheckpoint(Level level, String name, String details)
level - The log level of this method callname - The name of the checkpoint to incrementdetails - An optional message to include in the resulting log entry. Can be nullpublic void resetCheckpoint()
addCheckpoint()public void resetCheckpoint(String name)
name - The name of the checkpoint to resetpublic void logAssert(boolean condition,
String title)
condition - The condition to checktitle - The title of the Log Entrypublic void logAssert(boolean condition,
String titleFmt,
Object[] args)
An assert message is logged if this method is called with a condition parameter of the value false. No Log Entry is generated if this method is called with a condition parameter of the value true.
This version of the method accepts a format string and a related array of arguments. These parameters will be passed to the MessageFormat.format() method and the resulting string will be the assert message.
A typical usage of this method would be to test if a variable is not set to null before you use it. To do this, you just need to insert a logAssert call to the code section in question with "instance != null" as first parameter. If the reference is null and thus the expression evaluates to false, a message is logged.
condition - The condition to checktitleFmt - The format string to create the title of the Log Entryargs - The array of arguments for the format stringpublic void logAssigned(String title, Object instance)
If the instance argument is null, then ": Not assigned", otherwise ": Assigned" will be appended to the title before the Log Entry is sent.
This method is useful to check source code for null references in places where you experienced or expect problems and want to log possible null references.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
title - The title of the variableinstance - The variable which should be checked for nullpublic void logAssigned(Level level, String title, Object instance)
If the instance argument is null, then ": Not assigned", otherwise ": Assigned" will be appended to the title before the log entry is sent.
This method is useful to check source code for null references in places where you experienced or expect problems and want to log possible null references.
level - The log level of this method calltitle - The title of the variableinstance - The variable which should be checked for nullpublic void logConditional(boolean condition,
String title)
condition - The condition to evaluatetitle - The title of the conditional messagepublic void logConditional(boolean condition,
String titleFmt,
Object[] args)
This version of the method accepts a format string and a related array of arguments. These parameters will be passed to the MessageFormat.format method and the resulting string will be the conditional message.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
condition - The condition to evaluatetitleFmt - The format string to create the conditional messageargs - The array of arguments for the format stringpublic void logConditional(Level level, boolean condition, String title)
level - The log level of this method callcondition - The condition to evaluatetitle - The title of the conditional messagepublic void logConditional(Level level, boolean condition, String titleFmt, Object[] args)
This method only sends a message if the passed 'condition' argument evaluates to true. If 'condition' is false, this method has no effect and nothing is logged. This method is thus the counter piece to logAssert.
This version of the method accepts a format string and a related array of arguments. These parameters will be passed to the MessageFormat.format method and the resulting string will be the conditional message.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
level - The log level of this method callcondition - The condition to evaluatetitleFmt - The format string to create the conditional messageargs - The array of arguments for the format stringpublic void logBoolean(String name, boolean value)
name - The variable namevalue - The variable valuepublic void logBoolean(Level level, String name, boolean value)
level - The log level of this method callname - The variable namevalue - The variable valuepublic void logChar(String name, char value)
SmartInspect.setDefaultLevel(com.gurock.smartinspect.Level) of the session's
parent as log level. For more information, please refer to the documentation
of the SmartInspect.setDefaultLevel(com.gurock.smartinspect.Level) method of the SmartInspect class.name - The variable namevalue - The variable valuepublic void logChar(Level level, String name, char value)
level - The log level of this method callname - The variable namevalue - The variable valuepublic void logByte(String name, byte value)
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
name - The variable namevalue - The variable valuepublic void logByte(Level level, String name, byte value)
level - The log level of this method callname - The variable namevalue - The variable valuepublic void logByte(String name, byte value, boolean includeHex)
This method logs the name and value of a byte variable. If you set the includeHex argument to true then the hexadecimal representation of the supplied variable value is included as well.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
name - The variable namevalue - The variable valueincludeHex - Indicates if a hexadecimal representation should be includedpublic void logByte(Level level, String name, byte value, boolean includeHex)
level - The log level of this method callname - The variable namevalue - The variable valueincludeHex - Indicates if a hexadecimal representation should be includedpublic void logShort(String name, short value)
This method logs the name and value of a short integer variable. A title like "name = 23" will be displayed in the Console.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
name - The variable namevalue - The variable valuepublic void logShort(Level level, String name, short value)
This method logs the name and value of a short integer variable. A title like "name = 23" will be displayed in the Console.
level - The log level of this method callname - The variable namevalue - The variable valuepublic void logShort(String name, short value, boolean includeHex)
This method logs the name and value of a short integer variable. If you set the includeHex argument to true then the hexadecimal representation of the supplied variable value is included as well.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
name - The variable namevalue - The variable valueincludeHex - Indicates if a hexadecimal representation should be includedpublic void logShort(Level level, String name, short value, boolean includeHex)
level - The log level of this method callname - The variable namevalue - The variable valueincludeHex - Indicates if a hexadecimal representation should be includedpublic void logInt(String name, int value)
This method logs the name and value of an integer variable. A title like "name = 23" will be displayed in the Console.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
name - The variable namevalue - The variable valuepublic void logInt(Level level, String name, int value)
This method logs the name and value of an integer variable. A title like "name = 23" will be displayed in the Console.
level - The log level of this method callname - The variable namevalue - The variable valuepublic void logInt(String name, int value, boolean includeHex)
This method logs the name and value of an integer variable. If you set the includeHex argument to true then the hexadecimal representation of the supplied variable value is included as well.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
name - The variable namevalue - The variable valueincludeHex - Indicates if a hexadecimal representation should be includedpublic void logInt(Level level, String name, int value, boolean includeHex)
This method logs the name and value of an integer variable. If you set the includeHex argument to true then the hexadecimal representation of the supplied variable value is included as well.
level - The log level of this method callname - The variable namevalue - The variable valueincludeHex - Indicates if a hexadecimal representation should be includedpublic void logLong(String name, long value)
This method logs the name and value of a long integer variable. A title like "name = 23" will be displayed in the Console.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
name - The variable namevalue - The variable valuepublic void logLong(Level level, String name, long value)
level - The log level of this method callname - The variable namevalue - The variable valuepublic void logLong(String name, long value, boolean includeHex)
This method logs the name and value of a long integer variable. If you set the includeHex argument to true then the hexadecimal representation of the supplied variable value is included as well.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
name - The variable namevalue - The variable valueincludeHex - Indicates if a hexadecimal representation should be includedpublic void logLong(Level level, String name, long value, boolean includeHex)
This method logs the name and value of a long integer variable. If you set the includeHex argument to true then the hexadecimal representation of the supplied variable value is included as well.
level - The log level of this method callname - The variable namevalue - The variable valueincludeHex - Indicates if a hexadecimal representation should be includedpublic void logFloat(String name, float value)
This method logs the name and value of a float variable. A title like "name = 3.1415" will be displayed in the Console.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
name - The variable namevalue - The variable valuepublic void logFloat(Level level, String name, float value)
level - The log level of this method callname - The variable namevalue - The variable valuepublic void logDouble(String name, double value)
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
name - The variable namevalue - The variable valuepublic void logDouble(Level level, String name, double value)
This method logs the name and value of a double variable. A title like "name = 3.1415" will be displayed in the Console.
level - The log level of this method callname - The variable namevalue - The variable valuepublic void logString(String name, String value)
This method logs the name and value of a string variable. A title like "name = "string"" will be displayed in the Console.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
name - The variable namevalue - The variable valuepublic void logString(Level level, String name, String value)
This method logs the name and value of a string variable. A title like "name = "string"" will be displayed in the Console.
level - The log level of this method callname - The variable namevalue - The variable valuepublic void logObjectValue(String name, Object value)
This method logs the name and value of an object. The title to display in the Console will consist of the name and the return value of the toString method of the object.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
name - The variable namevalue - The variable valuepublic void logObjectValue(Level level, String name, Object value)
This method logs the name and value of an object. The title to display in the Console will consist of the name and the return value of the toString method of the object.
level - The log level of this method callname - The variable namevalue - The variable valuepublic void logDate(String name, Date value)
This method logs the name and value of a Date instance. A title like "name = Wed Dec 29 10:52:31 CET 2004" will be displayed in the Console.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
name - The variable namevalue - The variable valuepublic void logDate(Level level, String name, Date value)
This method logs the name and value of a Date instance. A title like "name = Wed Dec 29 10:52:31 CET 2004" will be displayed in the Console.
level - The log level of this method callname - The variable namevalue - The variable valuepublic void logValue(String name, boolean value)
name - The name of the variablevalue - The boolean value of the variablepublic void logValue(Level level, String name, boolean value)
level - The log level of this method callname - The name of the variablevalue - The boolean value of the variablepublic void logValue(String name, char value)
name - The name of the variablevalue - The char value of the variablepublic void logValue(Level level, String name, char value)
level - The log level of this method callname - The name of the variablevalue - The char value of the variablepublic void logValue(String name, byte value)
This method just calls the logByte method.
This method uses the SmartInspect.setDefaultLevel(com.gurock.smartinspect.Level)
of the session's getParent() as log
level. For more information, please refer to the documentation of
the SmartInspect.setDefaultLevel(com.gurock.smartinspect.Level) method
of the SmartInspect class.
name - The name of the variablevalue - The byte value of the variablepublic void logValue(Level level, String name, byte value)
Note: This method just calls the logByte method.
level - The log level of this method callname - The name of the variablevalue - The byte value of the variablepublic void logValue(String name, short value)
name - The name of the variablevalue - The short integer value of the variablepublic void logValue(Level level, String name, short value)
This method just calls the logShort method.
level - The log level of this method callname - The name of the variablevalue - The short integer value of the variablepublic void logValue(String name, int value)
This method just calls the logInt method.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
name - The name of the variablevalue - The integer value of the variablepublic void logValue(Level level, String name, int value)
This method just calls the logInt method.
level - The log level of this method callname - The name of the variablevalue - The integer value of the variablepublic void logValue(String name, long value)
name - The name of the variablevalue - The long integer value of the variablepublic void logValue(Level level, String name, long value)
level - The log level of this method callname - The name of the variablevalue - The long integer value of the variablepublic void logValue(String name, float value)
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
name - The name of the variablevalue - The float value of the variablepublic void logValue(Level level, String name, float value)
level - The log level of this method callname - The name of the variablevalue - The float value of the variablepublic void logValue(String name, double value)
This method just calls the logDouble method.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
name - The name of the variablevalue - The double value of the variablepublic void logValue(Level level, String name, double value)
level - The log level of this method callname - The name of the variablevalue - The double value of the variablepublic void logValue(String name, String value)
This method just calls the logString method. This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
name - The name of the variablevalue - The string value of the variablepublic void logValue(Level level, String name, String value)
level - The log level of this method callname - The name of the variablevalue - The string value of the variablepublic void logValue(String name, Object value)
This method just calls the logObjectValue method.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
name - The name of the variablevalue - The object to logpublic void logValue(Level level, String name, Object value)
level - The log level of this method callname - The name of the variablevalue - The object to logpublic void logValue(String name, Date value)
This method just calls the logDate method.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
name - The name of the variablevalue - The Date value of the variablepublic void logValue(Level level, String name, Date value)
level - The log level of this method callname - The name of the variablevalue - The Date value of the variablepublic void logCustomContext(String title, LogEntryType lt, ViewerContext ctx)
This method can be used to extend the capabilities of the SmartInspect Java library. You can assemble a so called viewer context and thus can send custom data to the SmartInspect Console. Furthermore, you can choose the viewer in which your data should be displayed. Every viewer in the Console has a corresponding viewer context class in this library.
Have a look at the ViewerContext class and its derived classes to see a list of available viewer context classes.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
title - The title to display in the Consolelt - The custom Log Entry typectx - See ViewerContextpublic void logCustomContext(Level level, String title, LogEntryType lt, ViewerContext ctx)
This method can be used to extend the capabilities of the SmartInspect Java library. You can assemble a so-called viewer context and thus can send custom data to the SmartInspect Console. Furthermore, you can choose the viewer in which your data should be displayed. Every viewer in the Console has a corresponding viewer context class in this library.
Have a look at the ViewerContext class and its derived classes to see a list of available viewer context classes.
level - The log level of this method calltitle - The title to display in the Consolelt - The custom Log Entry typectx - viewer contextViewerContextpublic void logCustomText(String title, String text, LogEntryType lt, ViewerId vi)
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
title - The title to display in the Consoletext - The text to loglt - The custom Log Entry typevi - The custom viewer ID which specifies the way the Console handles
the text contentpublic void logCustomText(Level level, String title, String text, LogEntryType lt, ViewerId vi)
level - The log level of this method calltitle - The title to display in the Consoletext - The text to loglt - The custom Log Entry typevi - The custom viewer ID which specifies the way the Console handles
the text contentpublic void logCustomFile(String fileName, LogEntryType lt, ViewerId vi)
This method logs the content of the supplied file using a custom Log Entry type and viewer ID. The parameters control the way the content of the file is displayed in the Console. Thus you can extend the functionality of the SmartInspect Java library with this method.
This version of the method uses the fileName argument as title to display in the Console.
This method uses the SmartInspect.setDefaultLevel(com.gurock.smartinspect.Level)
default level of the session's getParent() parent as log
level. For more information, please refer to the documentation of
the SmartInspect.setDefaultLevel(com.gurock.smartinspect.Level) method of the SmartInspect class.
fileName - The file to loglt - The custom Log Entry typevi - The custom viewer ID which specifies the way the Console
handles the file contentpublic void logCustomFile(Level level, String fileName, LogEntryType lt, ViewerId vi)
This method logs the content of the supplied file using a custom Log Entry type and viewer ID. The parameters control the way the content of the file is displayed in the Console. Thus you can extend the functionality of the SmartInspect Java library with this method.
This version of the method uses the fileName argument as title to display in the Console.
level - The log level of this method callfileName - The file to loglt - The custom Log Entry typevi - The custom viewer ID which specifies the way the Console handles
the file contentpublic void logCustomFile(String title, String fileName, LogEntryType lt, ViewerId vi)
This method logs the content of the supplied file using a custom Log Entry type and viewer ID. The parameters control the way the content of the file is displayed in the Console. Thus, you can extend the functionality of the SmartInspect Java library with this method.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
fileName - The file to loglt - The custom Log Entry typevi - The custom viewer ID which specifies the way the Console
handles the file contenttitle - The title to display in the Consolepublic void logCustomFile(Level level, String title, String fileName, LogEntryType lt, ViewerId vi)
This method logs the content of the supplied file using a custom Log Entry type and viewer ID. The parameters control the way the content of the file is displayed in the Console. Thus you can extend the functionality of the SmartInspect Java library with this method.
level - The log level of this method callfileName - The file to loglt - The custom Log Entry typevi - The custom viewer ID which specifies the way the Console handles the file contenttitle - The title to display in the Consolepublic void logCustomStream(String title, InputStream stream, LogEntryType lt, ViewerId vi)
title - The title to display in the Consolestream - The stream to loglt - The custom Log Entry typevi - The custom viewer ID which specifies the way the Console handles the stream contentpublic void logCustomStream(Level level, String title, InputStream stream, LogEntryType lt, ViewerId vi)
This method logs the content of the supplied stream using a custom Log Entry type and viewer ID. The parameters control the way the content of the file is displayed in the Console. Thus you can extend the functionality of the SmartInspect Java library with this method.
level - The log level of this method calltitle - The title to display in the Consolestream - The stream to loglt - The custom Log Entry typevi - The custom viewer ID which specifies the way the Console
handles the stream contentpublic void logCustomReader(String title, Reader reader, LogEntryType lt, ViewerId vi)
This method logs the content of the supplied reader using a custom Log Entry type and viewer ID. The parameters control the way the content of the file is displayed in the Console. Thus you can extend the functionality of the SmartInspect Java library with this method.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
title - The title to display in the Consolereader - The reader to loglt - The custom Log Entry typevi - The custom viewer ID which specifies the way the Console
handles the reader contentpublic void logCustomReader(Level level, String title, Reader reader, LogEntryType lt, ViewerId vi)
level - The log level of this method calltitle - The title to display in the Consolereader - The reader to loglt - The custom Log Entry typevi - The custom viewer ID which specifies the way the Console handles the reader contentpublic void logText(String title, String text)
title - The title to display in the Consoletext - The text to logpublic void logText(Level level, String title, String text)
level - The log level of this method calltitle - The title to display in the Consoletext - The text to logpublic void logTextFile(String fileName)
This version of the method uses the fileName argument as title to display in the Console.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
fileName - The file to logpublic void logTextFile(Level level, String fileName)
This version of the method uses the fileName argument as title to display in the Console.
level - The log level of this method callfileName - The file to logpublic void logTextFile(String title, String fileName)
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
title - The title to display in the ConsolefileName - The file to logpublic void logTextFile(Level level, String title, String fileName)
level - The log level of this method calltitle - The title to display in the ConsolefileName - The file to logpublic void logTextStream(String title, InputStream stream)
title - The title to display in the Consolestream - The stream to logpublic void logTextStream(Level level, String title, InputStream stream)
level - The log level of this method calltitle - The title to display in the Consolestream - The stream to logpublic void logTextReader(String title, Reader reader)
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
title - The title to display in the Consolereader - The reader to logpublic void logTextReader(Level level, String title, Reader reader)
level - The log level of this method calltitle - The title to display in the Consolereader - The reader to logpublic void logHtml(String title, String html)
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
title - The title to display in the Consolehtml - The HTML source code to displaypublic void logHtml(Level level, String title, String html)
level - The log level of this method calltitle - The title to display in the Consolehtml - The HTML source code to displaypublic void logHtmlFile(String fileName)
This method logs the HTML source code of the supplied file. The source code is displayed as a website in the web viewer of the Console.
This version of the method uses the fileName argument as title to display in the Console.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
fileName - The HTML file to displaypublic void logHtmlFile(Level level, String fileName)
This method logs the HTML source code of the supplied file. The source code is displayed as a website in the web viewer of the Console.
This version of the method uses the fileName argument as title to display in the Console.
level - The log level of this method callfileName - The HTML file to displaypublic void logHtmlFile(String title, String fileName)
This method logs the HTML source code of the supplied file. The source code is displayed as a website in the web viewer of the Console.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
title - The title to display in the ConsolefileName - The HTML file to displaypublic void logHtmlFile(Level level, String title, String fileName)
This method logs the HTML source code of the supplied file. The source code is displayed as a website in the web viewer of the Console.
level - The log level of this method calltitle - The title to display in the ConsolefileName - The HTML file to displaypublic void logHtmlStream(String title, InputStream stream)
This method logs the HTML source code of the supplied stream. The source code is displayed as a website in the web viewer of the Console.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
title - The title to display in the Consolestream - The stream to displaypublic void logHtmlStream(Level level, String title, InputStream stream)
This method logs the HTML source code of the supplied stream. The source code is displayed as a website in the web viewer of the Console.
level - The log level of this method calltitle - The title to display in the Consolestream - The stream to displaypublic void logHtmlReader(String title, Reader reader)
This method logs the HTML source code of the supplied reader. The source code is displayed as a website in the web viewer of the Console.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
title - The title to display in the Consolereader - The reader to displaypublic void logHtmlReader(Level level, String title, Reader reader)
This method logs the HTML source code of the supplied reader. The source code is displayed as a website in the web viewer of the Console.
level - The log level of this method calltitle - The title to display in the Consolereader - The reader to displaypublic void logBinary(String title, byte[] b)
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
title - The title to display in the Consoleb - The byte array to display in the hex viewerpublic void logBinary(Level level, String title, byte[] b)
level - The log level of this method calltitle - The title to display in the Consoleb - The byte array to display in the hex viewerpublic void logBinary(String title, byte[] b, int off, int len)
title - The title to display in the Consoleb - The byte array to display in the hex vieweroff - The offset at which to display data fromlen - The amount of bytes to displaypublic void logBinary(Level level, String title, byte[] b, int off, int len)
level - The log level of this method calltitle - The title to display in the Consoleb - The byte array to display in the hex vieweroff - The offset at which to display data fromlen - The amount of bytes to displaypublic void logBinaryFile(String fileName)
This version of the method uses the supplied fileName argument as title to display in the Console. This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
fileName - The binary file to display in a hex viewerpublic void logBinaryFile(Level level, String fileName)
level - The log level of this method callfileName - The binary file to display in a hex viewerpublic void logBinaryFile(String title, String fileName)
title - The title to display in the ConsolefileName - The binary file to display in a hex viewerpublic void logBinaryFile(Level level, String title, String fileName)
level - The log level of this method calltitle - The title to display in the ConsolefileName - The binary file to display in a hex viewerpublic void logBinaryStream(String title, InputStream stream)
This method uses the default level of the session's parent as log
level. For more information, please refer to the documentation of
the SmartInspect.setDefaultLevel(com.gurock.smartinspect.Level) method
of the SmartInspect class.
title - The title to display in the Consolestream - The binary stream to display in a hex viewerpublic void logBinaryStream(Level level, String title, InputStream stream)
level - The log level of this method calltitle - The title to display in the Consolestream - The binary stream to display in a hex viewerpublic void logBitmapFile(String fileName)
This version of the method uses the supplied fileName argument as title to display in the Console.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
fileName - The bitmap file to display in the Consolepublic void logBitmapFile(Level level, String fileName)
level - The log level of this method callfileName - The bitmap file to display in the Consolepublic void logBitmapFile(String title, String fileName)
title - The title to display in the ConsolefileName - The bitmap file to display in the Consolepublic void logBitmapFile(Level level, String title, String fileName)
level - The log level of this method calltitle - The title to display in the ConsolefileName - The bitmap file to display in the Consolepublic void logBitmapStream(String title, InputStream stream)
title - The title to display in the Consolestream - The stream to display as bitmappublic void logBitmapStream(Level level, String title, InputStream stream)
level - The log level of this method calltitle - The title to display in the Consolestream - The stream to display as bitmappublic void logJpegFile(String fileName)
This version of the method uses the supplied fileName argument as title to display in the Console.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
fileName - The JPEG file to display in the Consolepublic void logJpegFile(Level level, String fileName)
level - The log level of this method callfileName - The JPEG file to display in the Consolepublic void logJpegFile(String title, String fileName)
title - The title to display in the ConsolefileName - The JPEG file to display in the Consolepublic void logJpegFile(Level level, String title, String fileName)
level - The log level of this method calltitle - The title to display in the ConsolefileName - The JPEG file to display in the Consolepublic void logJpegStream(String title, InputStream stream)
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
title - The title to display in the Consolestream - The stream to display as JPEG imagepublic void logJpegStream(Level level, String title, InputStream stream)
level - The log level of this method calltitle - The title to display in the Consolestream - The stream to display as JPEG imagepublic void logIconFile(String fileName)
This version of the method uses the supplied fileName argument as title to display in the Console.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
fileName - The Windows icon file to display in the Consolepublic void logIconFile(Level level, String fileName)
This version of the method uses the supplied fileName argument as title to display in the Console.
level - The log level of this method callfileName - The Windows icon file to display in the Consolepublic void logIconFile(String title, String fileName)
title - The title to display in the ConsolefileName - The Windows icon file to display in the Consolepublic void logIconFile(Level level, String title, String fileName)
level - The log level of this method calltitle - The title to display in the ConsolefileName - The Windows icon file to display in the Consolepublic void logIconStream(String title, InputStream stream)
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
title - The title to display in the Consolestream - The stream to display as Windows iconpublic void logIconStream(Level level, String title, InputStream stream)
level - The log level of this method calltitle - The title to display in the Consolestream - The stream to display as Windows iconpublic void logMetafileFile(String fileName)
This version of the method uses the supplied fileName argument as title to display in the Console.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
fileName - The Windows Metafile file to display in the Consolepublic void logMetafileFile(Level level, String fileName)
level - The log level of this method callfileName - The Windows Metafile file to display in the Consolepublic void logMetafileFile(String title, String fileName)
title - The title to display in the consolefileName - The Windows Metafile file to display in the consolepublic void logMetafileFile(Level level, String title, String fileName)
level - The log level of this method calltitle - The title to display in the ConsolefileName - The Windows Metafile file to display in the Consolepublic void logMetafileStream(String title, InputStream stream)
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
title - The title to display in the Consolestream - The stream to display as Windows Metafile imagepublic void logMetafileStream(Level level, String title, InputStream stream)
level - The log level of this method calltitle - The title to display in the Consolestream - The stream to display as Windows Metafile imagepublic void logSql(String title, String source)
This method displays the supplied SQL source code with syntax highlighting in the Console.
It is especially useful to debug or track dynamically generated SQL source code.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
title - The title to display in the Consolesource - The SQL source code to logpublic void logSql(Level level, String title, String source)
This method displays the supplied SQL source code with syntax highlighting in the Console. It is especially useful to debug or track dynamically generated SQL source code.
level - The log level of this method calltitle - The title to display in the Consolesource - The SQL source code to logpublic void logSource(String title, String source, SourceId id)
This method displays the supplied source code with syntax highlighting in the Console. The type of the source code can be specified by the 'id' argument. Please see the SourceId documentation for information on the supported source code types.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
title - The title to display in the Consolesource - The source code to logid - Specifies the type of source codepublic void logSource(Level level, String title, String source, SourceId id)
level - The log level of this method calltitle - The title to display in the Consolesource - The source code to logid - Specifies the type of source codepublic void logSourceFile(String fileName, SourceId id)
This method displays the source file with syntax highlighting in the Console. The type of the source code can be specified by the 'id' argument. Please see the SourceId documentation for information on the supported source code types.
This version of the method uses the supplied fileName argument as title to display in the Console.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
fileName - The file which contains the source codeid - Specifies the type of source codepublic void logSourceFile(Level level, String fileName, SourceId id)
This method displays the source file with syntax highlighting in the Console. The type of the source code can be specified by the 'id' argument. Please see the SourceId documentation for information on the supported source code types.
This version of the method uses the supplied fileName argument as title to display in the Console.
level - The log level of this method callfileName - The file which contains the source codeid - Specifies the type of source codepublic void logSourceFile(String title, String fileName, SourceId id)
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
title - The title to display in the ConsolefileName - The file which contains the source codeid - Specifies the type of source codepublic void logSourceFile(Level level, String title, String fileName, SourceId id)
This method displays the source file with syntax highlighting in the Console. The type of the source code can be specified by the 'id' argument. Please see the SourceId documentation for information on the supported source code types.
level - The log level of this method calltitle - The title to display in the ConsolefileName - The file which contains the source codeid - Specifies the type of source codepublic void logSourceStream(String title, InputStream stream, SourceId id)
This method displays the content of a stream with syntax highlighting in the Console. The type of the source code can be specified by the 'id' argument. Please see the SourceId documentation for information on the supported source code types.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
title - The title to display in the Consolestream - The stream which contains the source codeid - Specifies the type of source codepublic void logSourceStream(Level level, String title, InputStream stream, SourceId id)
This method displays the content of a stream with syntax highlighting in the Console. The type of the source code can be specified by the 'id' argument. Please see the SourceId documentation for information on the supported source code types.
level - The log level of this method calltitle - The title to display in the Consolestream - The stream which contains the source codeid - Specifies the type of source codepublic void logSourceReader(String title, Reader reader, SourceId id)
This method displays the content of a reader with syntax highlighting in the Console. The type of the source code can be specified by the 'id' argument. Please see the SourceId documentation for information on the supported source code types.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
title - The title to display in the Consolereader - The reader which contains the source codeid - Specifies the type of source codepublic void logSourceReader(Level level, String title, Reader reader, SourceId id)
This method displays the content of a reader with syntax highlighting in the Console. The type of the source code can be specified by the 'id' argument. Please see the SourceId documentation for information on the supported source code types.
level - The log level of this method calltitle - The title to display in the Consolereader - The reader which contains the source codeid - Specifies the type of source codepublic void logObject(String title, Object instance)
This method logs all public field names and their current values of an object. These key/value pairs will be displayed in the Console in an object inspector-like viewer.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
title - The title to display in the Consoleinstance - The object whose public fields should be loggedpublic void logObject(Level level, String title, Object instance)
This method logs all public field names and their current values of an object. These key/value pairs will be displayed in the Console in an object inspector like viewer.
level - The log level of this method calltitle - The title to display in the Consoleinstance - The object whose public fields should be loggedpublic void logObject(String title, Object instance, boolean nonPublic)
You can specify if non-public or only public fields should be logged by setting the nonPublic argument to true or false, respectively. This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
title - The title to display in the Consoleinstance - The object whose fields should be loggednonPublic - Specifies if non-public members should be loggedpublic void logObject(Level level, String title, Object instance, boolean nonPublic)
This method logs all field names and their current values of an object. These key/value pairs will be displayed in the Console in an object inspector like viewer. You can specify if non public or only public fields should be logged by setting the nonPublic argument to true or false, respectively.
level - The log level of this method calltitle - The title to display in the Consoleinstance - The object whose fields should be loggednonPublic - Specifies if non-public members should be loggedpublic void logException(Throwable t)
This method extracts the exception message and stack trace from the supplied exception and logs an error with this data. It is especially useful if you place calls to this method in exception handlers, of course. See logError for a more general method with a similar intention.
This version of the method uses the exception message as title to display in the Console.
t - The exception to logpublic void logException(String title, Throwable t)
This method extracts the exception message and stack trace from the supplied exception and logs an error with this data. It is especially useful if you place calls to this method in exception handlers, of course. See logError for a more general method with a similar intention.
title - The title to display in the Consolet - The exception to logpublic void logMemoryStatistic()
public void logMemoryStatistic(Level level)
level - The log level of this method callpublic void logMemoryStatistic(String title)
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
title - The title to display in the Consolepublic void logMemoryStatistic(Level level, String title)
level - The log level of this method calltitle - The title to display in the Consolepublic void logCurrentThread()
This method logs information about the current thread. This includes its name, its current state and more.
logCurrentThread is especially useful in a multi-threaded program like in a network server application. By using this method you can easily track all threads of a process and obtain detailed information about them.
See logThread for a more general method, which can handle any thread.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
public void logCurrentThread(Level level)
Logs information about the current thread with a custom log level.
This method logs information about the current thread. This includes its name, its current state and more.
logCurrentThread is especially useful in a multi-threaded program like in a network server application. By using this method you can easily track all threads of a process and obtain detailed information about them.
See logThread for a more general method, which can handle any thread.
level - The log level of this method callpublic void logCurrentThread(String title)
title - The title to display in the Consolepublic void logCurrentThread(Level level, String title)
This method logs information about the current thread. This includes its name, its current state and more.
logCurrentThread is especially useful in a multithreaded program like in a network server application. By using this method you can easily track all threads of a process and obtain detailed information about them.
See logThread for a more general method, which can handle any thread.
level - The log level of this method calltitle - The title to display in the Consolepublic void logThread(String title, Thread thread)
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
title - The title to display in the Consolethread - The thread to logpublic void logThread(Level level, String title, Thread thread)
This method logs information about the supplied thread. This includes its name, its current state and more.
logThread is especially useful in a multithreaded program like in a network server application. By using this method you can easily track all threads of a process and obtain detailed information about them.
level - The log level of this method calltitle - The title to display in the Consolethread - The thread to logpublic void logCollection(String title, Collection c)
This method iterates through the supplied collection and
ObjectRenderer.renderObject(java.lang.Object) every element into
a string. These elements will be displayed in a listview in
the Console.
This method uses the SmartInspect.setDefaultLevel(com.gurock.smartinspect.Level)
of the session's getParent() as log level.
For more information, please refer to the documentation of the
SmartInspect.setDefaultLevel(com.gurock.smartinspect.Level) method
of the SmartInspect class.
title - The title to display in the Consolec - The collection to logpublic void logCollection(Level level, String title, Collection c)
level - The log level of this method calltitle - The title to display in the Consolec - The collection to logpublic void logMap(String title, Map map)
This methods iterates through the supplied dictionary and renders every key/value pair into a string. These pairs will be displayed in a special key/value table in the Console.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
title - The title to display in the Consolemap - The map to logpublic void logMap(Level level, String title, Map map)
This method iterates through the supplied dictionary and
ObjectRenderer.renderObject(java.lang.Object) every key/value
pair into a string. These pairs will be displayed in a special
key/value table in the Console.
level - The log level of this method calltitle - The title to display in the Consolemap - The map to logpublic void logArray(String title, Object[] array)
This method iterates through the supplied array and
renders every element into a string.
These elements will be displayed in a listview in the Console.
Please see logCollection to log a collection and logMap to log a map.
This method uses the default level of the
session's parent as log level. For more information,
please refer to the documentation of the setDefaultLevel
method of the SmartInspect class.
title - The title to display in the Consolearray - The array to logpublic void logArray(Level level, String title, Object[] array)
ObjectRenderer.renderObject(java.lang.Object) every element into a string. These elements will be displayed in a listview in the Console.
Please see logCollection to log a collection and logMap to log a map.level - The log level of this method calltitle - The title to display in the Consolearray - The array to logpublic void logCurrentStackTrace()
public void logCurrentStackTrace(Level level)
level - The log level of this method callpublic void logCurrentStackTrace(String title)
title - The title to display in the Consolepublic void logCurrentStackTrace(Level level, String title)
This method logs the current stack trace. The resulting Log Entry contains all methods including the related classes that are currently on the stack. Furthermore, the filename and line numbers will be included.
level - The log level of this method calltitle - The title to display in the Consolepublic void logSystem()
The logged information include the version of the operating system, the Java version and more. This method is useful for logging general information at the program startup. This guarantees that the support staff or developers have general information about the execution environment.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
public void logSystem(Level level)
level - The log level of this method callpublic void logSystem(String title)
The logged information include the version of the operating system, the Java version and more. This method is useful for logging general information at the program startup. This guarantees that the support staff or developers have general information about the execution environment.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
title - The title to display in the Consolepublic void logSystem(Level level, String title)
level - The log level of this method calltitle - The title to display in the Consolepublic void logResultSetMetaData(String title, ResultSet rset)
This method sends the schema of a ResultSet. A schema includes the most important properties of every column in the set.
This logResultSetMetaData method is especially useful in database applications with lots of queries. It gives you the possibility to see the raw schema of query results.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
title - The title to display in the Consolerset - The ResultSet instance whose metadata should be loggedpublic void logResultSetMetaData(Level level, String title, ResultSet rset)
level - The log level of this method calltitle - The title to display in the Consolerset - The ResultSet instance whose metadata should be loggedpublic void logResultSetMetaData(String title, ResultSetMetaData rmeta)
This method sends the schema of a ResultSet. A schema includes the most important properties of every column in the set.
The logResultSetMetaData method is especially useful in database applications with lots of queries. It gives you the ability to see the raw schema of query results.
This method uses the default level of the session's parent as log level. For more details, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
title - Result set titlermeta - The metadata of a ResultSet which should be loggedpublic void logResultSetMetaData(Level level, String title, ResultSetMetaData rmeta)
This method sends the schema of a ResultSet. A schema includes the most important properties of every column in the set. This logResultSetMetaData method is especially useful in database applications with lots of queries. It gives you the possibility to see the raw schema of query results.
level - The log level of this method calltitle - Result set titlermeta - The metadata of a ResultSet which should be loggedpublic void logResultSet(String title, ResultSet rset)
This method logs the content of a ResultSet instance. This logResultSet method is especially useful in database applications with lots of queries. It gives you the possibility to see the raw query results.
Please note that this method tries to restore the original row position of the supplied ResultSet instance after reading the content, but only if its type is not ResultSet.TYPE_FORWARD_ONLY.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
title - The title to display in the Consolerset - The ResultSet instance whose content should be loggedpublic void logResultSet(Level level, String title, ResultSet rset)
level - The log level of this method calltitle - The title to display in the Consolerset - The ResultSet instance whose content should be loggedpublic void logStringBuffer(String title, StringBuffer sb)
title - The title to display in the Consolesb - The StringBuffer instance whose content should be loggedpublic void logStringBuffer(Level level, String title, StringBuffer sb)
level - The log level of this method calltitle - The title to display in the Consolesb - The StringBuffer instance whose content should be loggedpublic void logStream(String title, InputStream stream)
The content of the supplied binary stream will be displayed in a read-only hex editor.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
title - The title to display in the Consolestream - The stream whose content should be loggedpublic void logStream(Level level, String title, InputStream stream)
level - The log level of this method calltitle - The title to display in the Consolestream - The stream whose content should be loggedpublic void logReader(String title, Reader reader)
title - The title to display in the Consolereader - The reader whose content should be loggedpublic void logReader(Level level, String title, Reader reader)
level - The log level of this method calltitle - The title to display in the Consolereader - The reader whose content should be loggedpublic void clearLog()
public void clearWatches()
public void clearAutoViews()
public void clearAll()
This method resets the whole Console. This means that all Watches, Log Entries, Process Flow entries and AutoViews will be deleted.
public void clearProcessFlow()
public void incCounter(String name)
The Session class tracks a list of so called named counters. A counter has a name and a value of type integer. This method increments the value for the specified counter by one and then sends a normal integer watch with the name and value of the counter. The initial value of a counter is 0. To reset the value of a counter to 0 again, you can call resetCounter.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
See decCounter for a method which decrements the value of a named counter instead of incrementing it.
name - The name of the counter to logpublic void incCounter(Level level, String name)
The Session class tracks a list of so called named counters. A counter has a name and a value of type integer. This method increments the value for the specified counter by one and then sends a normal integer watch with the name and value of the counter. The initial value of a counter is 0. To reset the value of a counter to 0 again, you can call resetCounter.
See decCounter for a method which decrements the value of a named counter instead of incrementing it.
level - The log level of this method callname - The name of the counter to logpublic void decCounter(String name)
The Session class tracks a list of so called named counters. A counter has a name and a value of type integer. This method decrements the value for the specified counter by one and then sends a normal integer watch with the name and value of the counter. The initial value of a counter is 0. To reset the value of a counter to 0 again, you can call resetCounter.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
See incCounter for a method which increments the value of a named counter instead of decrementing it.
name - The name of the counter to logpublic void decCounter(Level level, String name)
The Session class tracks a list of so called named counters. A counter has a name and a value of type integer. This method decrements the value for the specified counter by one and then sends a normal integer watch with the name and value of the counter. The initial value of a counter is 0. To reset the value of a counter to 0 again, you can call resetCounter.
See incCounter for a method which increments the value of a named counter instead of decrementing it.
level - The log level of this method callname - The name of the counter to logpublic void resetCounter(String name)
name - The name of the counter to resetpublic void watchChar(String name, char value)
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
name - The name of the Watchvalue - The value to display as Watch valueWatchpublic void watchChar(Level level, String name, char value)
level - The log level of this method callname - The name of the Watchvalue - The value to display as Watch valueWatchpublic void watchString(String name, String value)
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
name - The name of the Watchvalue - The value to display as Watch valueWatchpublic void watchString(Level level, String name, String value)
level - The log level of this method callname - The name of the Watchvalue - The value to display as Watch valueWatchpublic void watchByte(String name, byte value)
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
name - The name of the Watchvalue - The value to display as Watch valueWatchpublic void watchByte(Level level, String name, byte value)
level - The log level of this method callname - The name of the Watchvalue - The value to display as Watch valueWatchpublic void watchByte(String name, byte value, boolean includeHex)
This method logs a byte Watch. You can specify if a hexadecimal representation should be included as well by setting the includeHex parameter to true.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
name - The name of the Watchvalue - The value to display as Watch valueincludeHex - Indicates if a hexadecimal representation should be includedWatchpublic void watchByte(Level level, String name, byte value, boolean includeHex)
This method logs a byte Watch. You can specify if a hexadecimal representation should be included as well by setting the includeHex parameter to true.
level - The log level of this method callname - The name of the Watchvalue - The value to display as Watch valueincludeHex - Indicates if a hexadecimal representation should be includedWatchpublic void watchShort(String name, short value)
name - The name of the Watchvalue - The value to display as Watch valueWatchpublic void watchShort(Level level, String name, short value)
level - The log level of this method callname - The name of the Watchvalue - The value to display as Watch valueWatchpublic void watchShort(String name, short value, boolean includeHex)
This method logs a short integer Watch. You can specify if a hexadecimal representation should be included as well by setting the includeHex parameter to true.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
name - The name of the Watchvalue - The value to display as Watch valueincludeHex - Indicates if a hexadecimal representation should be includedWatchpublic void watchShort(Level level, String name, short value, boolean includeHex)
This method logs a short integer Watch. You can specify if a hexadecimal representation should be included as well by setting the includeHex parameter to true.
level - The log level of this method callname - The name of the Watchvalue - The value to display as Watch valueincludeHex - Indicates if a hexadecimal representation should be includedWatchpublic void watchInt(String name, int value)
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
name - The name of the Watchvalue - The value to display as Watch valueWatchpublic void watchInt(Level level, String name, int value)
level - The log level of this method callname - The name of the Watchvalue - The value to display as Watch valueWatchpublic void watchInt(String name, int value, boolean includeHex)
This method logs an integer Watch. You can specify if a hexadecimal representation should be included as well by setting the includeHex parameter to true.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
name - The name of the Watchvalue - The value to display as Watch valueincludeHex - Indicates if a hexadecimal representation should be includedWatchpublic void watchInt(Level level, String name, int value, boolean includeHex)
level - The log level of this method callname - The name of the Watchvalue - The value to display as Watch valueincludeHex - Indicates if a hexadecimal representation should be includedWatchpublic void watchLong(String name, long value)
name - The name of the Watchvalue - The value to display as Watch valueWatchpublic void watchLong(Level level, String name, long value)
level - The log level of this method callname - The name of the Watchvalue - The value to display as Watch valueWatchpublic void watchLong(String name, long value, boolean includeHex)
This method logs a long integer Watch. You can specify if a hexadecimal representation should be included as well by setting the includeHex parameter to true.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
name - The name of the Watchvalue - The value to display as Watch valueincludeHex - Indicates if a hexadecimal representation should be includedWatchpublic void watchLong(Level level, String name, long value, boolean includeHex)
level - The log level of this method callname - The name of the Watchvalue - The value to display as Watch valueincludeHex - Indicates if a hexadecimal representation should be included.Watchpublic void watchFloat(String name, float value)
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
name - The name of the Watchvalue - The value to display as Watch valueWatchpublic void watchFloat(Level level, String name, float value)
level - The log level of this method callname - The name of the Watchvalue - The value to display as Watch valueWatchpublic void watchDouble(String name, double value)
name - The name of the Watchvalue - The value to display as Watch valueWatchpublic void watchDouble(Level level, String name, double value)
level - The log level of this method callname - The name of the Watchvalue - The value to display as Watch valueWatchpublic void watchBoolean(String name, boolean value)
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
name - The name of the Watchvalue - The value to display as Watch valueWatchpublic void watchBoolean(Level level, String name, boolean value)
level - The log level of this method callname - The name of the Watchvalue - The value to display as Watch valueWatchpublic void watchDate(String name, Date value)
name - The name of the Watchvalue - The value to display as Watch valueWatchpublic void watchDate(Level level, String name, Date value)
level - The log level of this method callname - The name of the Watchvalue - The value to display as Watch valueWatchpublic void watchObject(String name, Object value)
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
name - The name of the Watchvalue - The value to display as Watch valueWatchpublic void watchObject(Level level, String name, Object value)
level - The log level of this method callname - The name of the Watchvalue - The value to display as Watch valueWatchpublic void watch(String name, char value)
This method just calls the watchChar method.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
name - The name of the Watchvalue - The char value to display as Watch valuepublic void watch(Level level, String name, char value)
This method just calls the watchChar method.
level - The log level of this method callname - The name of the Watchvalue - The char value to display as Watch valuepublic void watch(String name, String value)
name - The name of the Watchvalue - The string value to display as Watch valuepublic void watch(Level level, String name, String value)
level - The log level of this method callname - The name of the Watchvalue - The string value to display as Watch valuepublic void watch(String name, byte value)
Overloaded. Logs a byte watch with the default log level.
name - The name of the watchvalue - The byte value to display as watch valuepublic void watch(Level level, String name, byte value)
level - The log level of this method callname - The name of the Watchvalue - The byte value to display as Watch valuepublic void watch(String name, short value)
SmartInspect.setDefaultLevel(com.gurock.smartinspect.Level) of the session's getParent() as log
level. For more information, please refer to the documentation of the SmartInspect.setDefaultLevel(com.gurock.smartinspect.Level) method
of the SmartInspect class.name - The name of the Watch.value - The short integer value to display as Watch value.public void watch(Level level, String name, short value)
level - The log level of this method callname - The name of the Watchvalue - The short integer value to display as Watch valuepublic void watch(String name, int value)
name - The name of the Watchvalue - The integer value to display as Watch valuepublic void watch(Level level, String name, int value)
level - The log level of this method callname - The name of the Watchvalue - The integer value to display as Watch valuepublic void watch(String name, long value)
name - The name of the Watchvalue - The long integer value to display as Watch valuepublic void watch(Level level, String name, long value)
This method just calls the watchLong method.
level - The log level of this method callname - The name of the Watchvalue - The long integer value to display as Watch valuepublic void watch(String name, float value)
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
name - The name of the Watchvalue - The float value to display as Watch valuepublic void watch(Level level, String name, float value)
This method just calls the watchFloat method.
level - The log level of this method callname - The name of the Watchvalue - The float value to display as Watch valuepublic void watch(String name, double value)
name - The name of the Watchvalue - The double value to display as Watch valuepublic void watch(Level level, String name, double value)
level - The log level of this method callname - The name of the Watchvalue - The double value to display as Watch valuepublic void watch(String name, boolean value)
This method just calls the watchBoolean method. This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
name - The name of the Watchvalue - The boolean value to display as Watch valuepublic void watch(Level level, String name, boolean value)
level - The log level of this method callname - The name of the Watchvalue - The boolean value to display as Watch valuepublic void watch(String name, Date value)
This method just calls the watchDate method.
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
name - The name of the Watchvalue - The Date value to display as Watch valuepublic void watch(Level level, String name, Date value)
level - The log level of this method callname - The name of the Watchvalue - The Date value to display as Watch valuepublic void watch(String name, Object value)
SmartInspect.setDefaultLevel(com.gurock.smartinspect.Level) of the session's getParent() as log level.
For more information, please refer to the documentation of the SmartInspect.setDefaultLevel(com.gurock.smartinspect.Level) method
of the SmartInspect class.name - The name of the Watchvalue - The Object value to display as Watch valuepublic void watch(Level level, String name, Object value)
level - The log level of this method callname - The name of the Watchvalue - The Object value to display as Watch valuepublic void sendCustomLogEntry(String title, LogEntryType lt, ViewerId vi, byte[] data)
This method uses the default level of the session's parent as log level. For more information, please refer to the documentation of the setDefaultLevel method of the SmartInspect class.
title - The title of the new Log Entrylt - The Log Entry type to usevi - The Viewer ID to usedata - Optional data block which can be nullLogEntrypublic void sendCustomLogEntry(Level level, String title, LogEntryType lt, ViewerId vi, byte[] data)
level - The log level of this method calltitle - The title of the new Log Entrylt - The Log Entry type to usevi - The Viewer ID to usedata - Optional data block which can be nullLogEntrypublic void sendCustomControlCommand(ControlCommandType ct, byte[] data)
ct - The Control Command type to usedata - Optional data block which can be nullControlCommandpublic void sendCustomControlCommand(Level level, ControlCommandType ct, byte[] data)
level - The log level of this method callct - The Control Command type to usedata - Optional data block which can be nullControlCommandpublic void sendCustomWatch(String name, String value, WatchType wt)
name - The name of the new Watchvalue - The value of the new Watchwt - The Watch type to useWatchpublic void sendCustomWatch(Level level, String name, String value, WatchType wt)
level - The log level of this method callname - The name of the new Watchvalue - The value of the new Watchwt - The Watch type to useWatchpublic void sendCustomProcessFlow(String title, ProcessFlowType pt)
This method uses the default level of the session's parent as log level.
For more information, please refer to the
documentation of the SmartInspect.setDefaultLevel(com.gurock.smartinspect.Level) method
of the SmartInspect class.
title - The title of the new Process Flow entry.pt - The Process Flow type to use.ProcessFlowpublic void sendCustomProcessFlow(Level level, String title, ProcessFlowType pt)
level - Log leveltitle - The title of the new Process Flow entrypt - The Process Flow type to useProcessFlowCopyright © 2023. All rights reserved.