Interface ITracer
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Logs a message if the ITracer is set to Debug level or higher.void
Logs a message if the ITracer is set to Debug level or higher.void
Logs an exception if the ITracer is set to Debug level or higher.void
Logs a message with an exception if the ITracer is set to Debug level or higher.void
debugEntry
(String message) Logs a message if debugging of entry/exit is enabled; use at the entry of methods.void
debugEntry
(String format, Object... args) Logs a message if debugging of entry/exit is enabled; use at the entry of methods.void
Logs a message if debugging of entry/exit is enabled; use at the exit of methods.void
Logs a message if debugging of entry/exit is enabled; use at the exit of methods.void
debugSwitched
(String switchName, String message) Logs a message if the ITracer is set to Debug level or higher and the specified switch is on.void
debugSwitched
(String switchName, String format, Object... args) Logs a message if the ITracer is set to Debug level or higher and the specified switch is on.void
Logs a message if the ITracer is set to Error level or higher.void
Logs a message if the ITracer is set to Error level or higher.void
Logs a message with an exception if the ITracer is set to Error level or higher.void
Logs an exception if the ITracer is set to Error level or higher.void
Logs a message if the ITracer is set to Fatal level or higher.void
Logs a message if the ITracer is set to Fatal level or higher.void
Logs a message with an exception if the ITracer is set to Fatal level or higher.void
Logs an exception if the ITracer is set to Fatal level or higher.void
Logs a message if the ITracer is set to Info level or higher.void
Logs a message if the ITracer is set to Info level or higher.void
Logs a message with an exception if the ITracer is set to Info level or higher.void
Logs an exception if the ITracer is set to Info level or higher.boolean
Gets a value indicating whether the level of this ITracer is set to Debug or higher.boolean
Gets a value indicating whether debugging of entry/exit is enabled for this ITracer.boolean
Gets a value indicating whether the level of this ITracer is set to Error or higher.boolean
Gets a value indicating whether the level of this ITracer is set to Fatal or higher.boolean
Gets a value indicating whether the level of this ITracer is set to Info or higher.boolean
isSwitchEnabled
(String switchName) Determines whether a particular tracing switch is enabled for thisTracer.boolean
Gets a value indicating whether the level of this ITracer is set to Trace or higher.boolean
Gets a value indicating whether the level of this ITracer is set to Warn or higher.Pops the last tracing context off the context stack.void
pushContext
(String context) Push a context onto the stack.void
Logs a message if the ITracer is set to Trace level or higher.void
Logs a message with an exception if the ITracer is set to Trace level or higher.void
Logs an exception if the ITracer is set to Trace level or higher.void
Logs a message if the ITracer is set to Warn level or higher.void
Logs a message if the ITracer is set to Warn level or higher.void
Logs a message with an exception if the ITracer is set to Warn level or higher.void
Logs an exception if the ITracer is set to Warn level or higher.
-
Method Details
-
debug
Logs a message if the ITracer is set to Debug level or higher.- Parameters:
message
- The message to log.
-
debug
Logs a message if the ITracer is set to Debug level or higher. Note the format argument must be applicable to java.text.MessageFormat.format- Parameters:
format
- A string containing zero or more format items.args
- An array containing zero or more objects to format.
-
debug
Logs an exception if the ITracer is set to Debug level or higher.- Parameters:
ex
- The exception to log.
-
isTraceEnabled
boolean isTraceEnabled()Gets a value indicating whether the level of this ITracer is set to Trace or higher.- Returns:
- isEnabled
-
trace
Logs a message if the ITracer is set to Trace level or higher.- Parameters:
message
- The message to log.
-
trace
Logs an exception if the ITracer is set to Trace level or higher.- Parameters:
ex
- The exception to log.
-
trace
Logs a message with an exception if the ITracer is set to Trace level or higher.- Parameters:
ex
- The exception to log.message
- The message to log.
-
debug
Logs a message with an exception if the ITracer is set to Debug level or higher.- Parameters:
message
- The message to log.ex
- The exception to log.
-
debugEntry
Logs a message if debugging of entry/exit is enabled; use at the entry of methods.- Parameters:
message
- The message to log.
-
debugEntry
Logs a message if debugging of entry/exit is enabled; use at the entry of methods. Note the format argument must be applicable to java.text.MessageFormat.format- Parameters:
format
- A string containing zero or more format items.args
- An array containing zero or more objects to format.
-
debugExit
Logs a message if debugging of entry/exit is enabled; use at the exit of methods.- Parameters:
message
- The message to log.
-
debugExit
Logs a message if debugging of entry/exit is enabled; use at the exit of methods. Note the format argument must be applicable to java.text.MessageFormat.format- Parameters:
format
- A string containing zero or more format items.args
- An array containing zero or more objects to format.
-
debugSwitched
Logs a message if the ITracer is set to Debug level or higher and the specified switch is on.- Parameters:
switchName
- The name of the switch to test.message
- The message to log.
-
debugSwitched
Logs a message if the ITracer is set to Debug level or higher and the specified switch is on. Note the format argument must be applicable to java.text.MessageFormat.format- Parameters:
switchName
- The name of the switch to test.format
- A string containing zero or more format items.args
- An array containing zero or more objects to format.
-
isSwitchEnabled
Determines whether a particular tracing switch is enabled for thisTracer.- Parameters:
switchName
- The name of the switch to test.- Returns:
- true if enabled, false otherwise
-
error
Logs a message if the ITracer is set to Error level or higher.- Parameters:
message
- The message to log.
-
error
Logs a message if the ITracer is set to Error level or higher. Note the format argument must be applicable to java.text.MessageFormat.format- Parameters:
format
- A string containing zero or more format items.args
- An array containing zero or more objects to format.
-
error
Logs an exception if the ITracer is set to Error level or higher.- Parameters:
ex
- The exception to log.
-
error
Logs a message with an exception if the ITracer is set to Error level or higher.- Parameters:
message
- The message to log.ex
- The exception to log.
-
isDebugEnabled
boolean isDebugEnabled()Gets a value indicating whether the level of this ITracer is set to Debug or higher.- Returns:
- isEnabled
-
isDebugEntryExitEnabled
boolean isDebugEntryExitEnabled()Gets a value indicating whether debugging of entry/exit is enabled for this ITracer.- Returns:
- isEnabled
-
isErrorEnabled
boolean isErrorEnabled()Gets a value indicating whether the level of this ITracer is set to Error or higher.- Returns:
- isEnabled
-
isWarnEnabled
boolean isWarnEnabled()Gets a value indicating whether the level of this ITracer is set to Warn or higher.- Returns:
- isEnabled
-
isFatalEnabled
boolean isFatalEnabled()Gets a value indicating whether the level of this ITracer is set to Fatal or higher.- Returns:
- isEnabled
-
isInfoEnabled
boolean isInfoEnabled()Gets a value indicating whether the level of this ITracer is set to Info or higher.- Returns:
- isEnabled
-
popContext
String popContext()Pops the last tracing context off the context stack.A Tracing Context is a mechanism to allow the user to output a context message along with the tracing message to aid in parsing interleaved tracing output from different sources. This context message provides a distinctive stamp to the tracing message.
There are some rules to using contexts: 1. The context implementation must be managed on a per-thread basis 2. Contexts can be nested 3. When entering a context call
pushContext(String)
4. When leaving a context callpopContext()
- Returns:
- The last context popped off the stack.
-
pushContext
Push a context onto the stack.A Tracing Context is a mechanism to allow the user to output a context message along with the tracing message to aid in parsing interleaved tracing output from different sources. This context message provides a distinctive stamp to the tracing message.
There are some rules to using contexts: 1. The context implementation must be managed on a per-thread basis 2. Contexts can be nested 3. When entering a context call
pushContext(String)
4. When leaving a context callpopContext()
- Parameters:
context
- the context
-
warn
Logs a message if the ITracer is set to Warn level or higher.- Parameters:
message
- The message to log.
-
warn
Logs a message if the ITracer is set to Warn level or higher. Note the format argument must be applicable to java.text.MessageFormat.format- Parameters:
format
- A string containing zero or more format items.args
- An array containing zero or more objects to format.
-
warn
Logs an exception if the ITracer is set to Warn level or higher.- Parameters:
ex
- The exception to log.
-
warn
Logs a message with an exception if the ITracer is set to Warn level or higher.- Parameters:
message
- The message to log.ex
- The exception to log.
-
info
Logs a message if the ITracer is set to Info level or higher.- Parameters:
message
- The message to log.
-
info
Logs a message if the ITracer is set to Info level or higher. Note the format argument must be applicable to java.text.MessageFormat.format- Parameters:
format
- A string containing zero or more format items.args
- An array containing zero or more objects to format.
-
info
Logs an exception if the ITracer is set to Info level or higher.- Parameters:
ex
- The exception to log.
-
info
Logs a message with an exception if the ITracer is set to Info level or higher.- Parameters:
message
- The message to log.ex
- The exception to log.
-
fatal
Logs a message if the ITracer is set to Fatal level or higher.- Parameters:
message
- The message to log.
-
fatal
Logs a message if the ITracer is set to Fatal level or higher. Note the format argument must be applicable to java.text.MessageFormat.format- Parameters:
format
- A string containing zero or more format items.args
- An array containing zero or more objects to format.
-
fatal
Logs an exception if the ITracer is set to Fatal level or higher.- Parameters:
ex
- The exception to log.
-
fatal
Logs a message with an exception if the ITracer is set to Fatal level or higher.- Parameters:
message
- The message to log.ex
- The exception to log.
-