public interface AmiTraceInterface
Modifier and Type | Field and Description |
---|---|
static int |
AMI_ALL
Trace level code for turning all trace levels.
|
static int |
AMI_ALWAYS
Trace level code for always logging a given message.
|
static int |
AMI_AMI
Trace level code for logging AMI API debugging level message.
|
static int |
AMI_DEBUG
Trace level code for logging generic debugging level message.
|
static int |
AMI_ERROR
Trace level code for logging error level message.
|
static int |
AMI_INFO
Trace level code for logging information level message.
|
static int |
AMI_MIN_LEVEL
The minimum allowable integer values for trace level.
|
static int |
AMI_WARNING
Trace level code for logging warning level message.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDirectoryName()
Returns the current trace directory path.
|
java.lang.String |
getFileName()
Returns the current trace file name.
|
long |
getFileSize()
Returns the current trace maximum file size.
|
int |
getLevel()
Returns the current trace level.
|
java.lang.String |
getLevelHelpString(int code)
Gets the help text corresponding to the given trace level.
|
java.lang.String |
getLevelLabelString(int code)
Gets the label string corresponding to the given trace level.
|
java.lang.String |
getLevelString(int level)
Returns the given trace level's string name.
|
long |
getMaxFile()
Returns the current trace maximum number of files before purging occurs.
|
int |
getMaxLevel()
Gets the current maximum settable level.
|
int |
getNumberOfLevels()
Gets the current number of distinct trace levels.
|
boolean |
isLevelOn(int code)
Returns true if the give bit set of the AMI API is turned on
|
void |
log(int code,
int error,
java.lang.String msg,
java.lang.Throwable e)
Logs the given exception's stack trace according to the current trace
properties.
|
void |
log(int code,
java.lang.String msg)
Logs the given msg if the current trace level has
the given
|
void |
log(int code,
java.lang.String msg,
java.lang.Throwable e)
Logs the given Throwable's stack trace.
|
void |
log(int code,
java.lang.Throwable e)
Logs the given Throwable's stack trace.
|
void |
log(java.util.ResourceBundle bundle,
java.lang.String id,
int msg_num,
boolean addStackTrace,
int code,
java.lang.Object[] params,
java.lang.Throwable e)
Logs the given Throwable's stack trace.
|
void |
log(java.util.ResourceBundle bundle,
java.lang.String id,
int msg_num,
int code,
java.lang.Object[] params) |
void |
logAlways(java.lang.String msg)
Logs the given msg with the AMI_ALWAYS bit.
|
void |
logAlways(java.lang.Throwable e)
Logs the given Throwable's stack trace with the AMI_ALWAYS bit.
|
void |
logAmi(java.lang.String msg)
Logs the given msg with the AMI_AMI bit.
|
void |
logAmi(java.lang.Throwable e)
Logs the given Throwable's stack trace with the AMI_AMI bit.
|
void |
logDebug(java.lang.String msg)
Logs the given msg with the AMI_DEBUG bit.
|
void |
logDebug(java.lang.Throwable e)
Logs the given Throwable's stack trace with the AMI_DEBUG bit.
|
void |
logError(java.lang.String msg)
Logs the given msg with the AMI_ERROR bit.
|
void |
logError(java.lang.Throwable e)
Logs the given Throwable's stack trace with the AMI_ERROR bit.
|
void |
logInfo(java.lang.String msg)
Logs the given msg with the AMI_INFO bit.
|
void |
logInfo(java.lang.Throwable e)
Logs the given Throwable's stack trace with the AMI_INFO bit.
|
void |
logWarning(java.lang.String msg)
Logs the given msg with the AMI_WARNING bit.
|
void |
logWarning(java.lang.Throwable e)
Logs the given Throwable's stack trace with the AMI_WARNING bit.
|
void |
setDirectoryName(java.lang.String dirName)
Sets the current trace directory path.
|
void |
setFileName(java.lang.String fileName)
Sets the current trace file name.
|
void |
setFileSize(long fileSize)
Sets the current trace file maximum size before rollover.
|
void |
setLevel(int level)
Sets the current trace level with the given int value.
|
void |
setMaxFile(long maxFile)
Sets the current trace maximum number of log file before purging.
|
int |
setUserLevel(java.lang.String user,
java.lang.String help) |
int |
setUserLevel(java.lang.String user,
java.lang.String label,
java.lang.String help)
Sets the next available user definable trace level.
|
static final int AMI_ALL
static final int AMI_ALWAYS
Constant int value for indicating that text message coded with this value will always be logged to the trace file no matter what the value of current trace level is.
static final int AMI_INFO
Constant int value for indicating that text message coded
with this value will be logged to the trace file if the current trace
level is set with the bit AMI_INFO
on.
static final int AMI_WARNING
Constant int value for indicating that text message coded
with this value will be logged to the trace file if the current trace
level is set with the bit AMI_WARNING
on.
static final int AMI_ERROR
Constant int value for indicating that text message coded
with this value will be logged to the trace file if the current trace
level is set with the bit AMI_ERROR
on.
static final int AMI_DEBUG
Constant int value for indicating that text message coded
with this value will be logged to the trace file if the current trace
level is set with the bit AMI_DEBUG
on.
static final int AMI_AMI
This trace level is reserved for AMI API use only.
Constant int value for indicating that text message coded
with this value will be logged to the trace file if the current trace
level is set with the bit AMI
on.
static final int AMI_MIN_LEVEL
void setLevel(int level) throws COM.TIBCO.hawk.utilities.exception.HawkException
level
- level
value representation of the trace levelCOM.TIBCO.hawk.utilities.exception.HawkException
- is thrown if the integer value is out
of the legal range.
When the given level is the value ALL
, all trace levels
are turned on.
Any combinations of the trace levels can be turned on by |
the levels together. For example:
AmiTrace trace = new AmiTrace(); trace.setLevel(trace.AMI_INFO | trace.AMI_DEBUG);
void setDirectoryName(java.lang.String dirName) throws COM.TIBCO.hawk.utilities.exception.HawkException
dirName
- Directory path name.COM.TIBCO.hawk.utilities.exception.HawkException
void setFileName(java.lang.String fileName) throws COM.TIBCO.hawk.utilities.exception.HawkException
fileName
- Name of the log file.COM.TIBCO.hawk.utilities.exception.HawkException
- void setFileSize(long fileSize) throws COM.TIBCO.hawk.utilities.exception.HawkException
fileSize
- Size of the file in Kbytes.COM.TIBCO.hawk.utilities.exception.HawkException
void setMaxFile(long maxFile) throws COM.TIBCO.hawk.utilities.exception.HawkException
maxFile
- Maximum number of rolled over files to keep.COM.TIBCO.hawk.utilities.exception.HawkException
int setUserLevel(java.lang.String user, java.lang.String label, java.lang.String help)
user
- User defined trace level string.label
- User defined trace level label string.help
- User defined trace level help text.int setUserLevel(java.lang.String user, java.lang.String help)
int getNumberOfLevels()
boolean isLevelOn(int code)
java.lang.String getLevelString(int level)
int getLevel()
int getMaxLevel()
java.lang.String getDirectoryName()
java.lang.String getFileName()
long getFileSize()
long getMaxFile()
java.lang.String getLevelLabelString(int code)
code
- Trace level to query for label string.java.lang.String getLevelHelpString(int code)
code
- Trace level to query for help text.void log(int code, java.lang.String msg)
msg if the current trace level has
the given code
set.
- Parameters:
code
- The trace code this message should be logged at.
msg
- The message to be logged.
Logs the given msg if the current trace level has
the given code
set. The only exceptions are if the
given code
is AMI_ALWAYS and AMI_ERROR, then msg
is logged to the trace file regardless of what the current trace level is. * The only exceptions are if the given code
is AMI_ALWAYS
and AMI_ERROR, then msg is logged to the trace file
regardless of what the current trace level is.
-
logAlways
void logAlways(java.lang.String msg)
Logs the given msg with the AMI_ALWAYS bit.
- Parameters:
msg
- The message to log.
This method is equivalent to invoking the method
log(Trace.AMI_ALWAYS, msg)
.
-
logInfo
void logInfo(java.lang.String msg)
Logs the given msg with the AMI_INFO bit.
- Parameters:
msg
- The message to log.
This method is equivalent to invoking the method
log(Trace.AMI_INFO, msg)
.
-
logWarning
void logWarning(java.lang.String msg)
Logs the given msg with the AMI_WARNING bit.
- Parameters:
msg
- The message to log.
This method is equivalent to invoking the method
log(Trace.AMI_WARNING, msg)
.
-
logError
void logError(java.lang.String msg)
Logs the given msg with the AMI_ERROR bit.
- Parameters:
msg
- The message to log.
This method is equivalent to invoking the method
log(Trace.AMI_ERROR, msg)
.
-
logDebug
void logDebug(java.lang.String msg)
Logs the given msg with the AMI_DEBUG bit.
- Parameters:
msg
- The message to log.
This method is equivalent to invoking the method
log(Trace.AMI_DEBUG, msg)
.
-
logAmi
void logAmi(java.lang.String msg)
Logs the given msg with the AMI_AMI bit.
- Parameters:
msg
- The message to log.
This method is equivalent to invoking the method
log(Trace.AMI_AMI, msg)
.
-
log
void log(int code,
java.lang.Throwable e)
Logs the given Throwable's stack trace.
- Parameters:
code
- A trace level code.
msg
- The message to log.
-
log
void log(int code,
java.lang.String msg,
java.lang.Throwable e)
Logs the given Throwable's stack trace.
- Parameters:
code
- A trace level code.
msg
- The message to log.
e
- The Throwable object to log.
-
log
void log(int code,
int error,
java.lang.String msg,
java.lang.Throwable e)
Logs the given exception's stack trace according to the current trace
properties.
- Parameters:
code
- A trace level code.
code
- Error code associated with message.
msg
- The message to log.
e
- The Throwable object to log.
-
logAlways
void logAlways(java.lang.Throwable e)
Logs the given Throwable's stack trace with the AMI_ALWAYS bit.
- Parameters:
e
- Throwable to log.
This method is equivalent to invoking the method
log(Trace.AMI_ALWAYS, e)
.
-
logInfo
void logInfo(java.lang.Throwable e)
Logs the given Throwable's stack trace with the AMI_INFO bit.
- Parameters:
e
- Throwable to log.
This method is equivalent to invoking the method
log(Trace.AMI_INFO, e)
.
-
logWarning
void logWarning(java.lang.Throwable e)
Logs the given Throwable's stack trace with the AMI_WARNING bit.
- Parameters:
e
- Throwable to log.
This method is equivalent to invoking the method
log(Trace.AMI_WARNING, e)
.
-
logError
void logError(java.lang.Throwable e)
Logs the given Throwable's stack trace with the AMI_ERROR bit.
- Parameters:
e
- Throwable to log.
This method is equivalent to invoking the method
log(Trace.AMI_ERROR, e)
.
-
logDebug
void logDebug(java.lang.Throwable e)
Logs the given Throwable's stack trace with the AMI_DEBUG bit.
- Parameters:
e
- Throwable to log.
This method is equivalent to invoking the method
log(Trace.AMI_DEBUG, e)
.
-
logAmi
void logAmi(java.lang.Throwable e)
Logs the given Throwable's stack trace with the AMI_AMI bit.
- Parameters:
e
- Throwable to log.
This method is equivalent to invoking the method
log(Trace.AMI_AMI, e)
.
-
log
void log(java.util.ResourceBundle bundle,
java.lang.String id,
int msg_num,
boolean addStackTrace,
int code,
java.lang.Object[] params,
java.lang.Throwable e)
Logs the given Throwable's stack trace.
- Parameters:
bundle
- the resource bundle
id
- the subsystem id or the message id
msg_num
- the message code number
addStackTrace
- true if stack trace dump is to be logged
code
- a trace level code.
params
- the parameters to format the message.
e
- the Throwable object to log.
-
log
void log(java.util.ResourceBundle bundle,
java.lang.String id,
int msg_num,
int code,
java.lang.Object[] params)
Copyright © 2000-2019 TIBCO Inc. All Rights Reserved.