public class AmiTrace extends COM.TIBCO.hawk.utilities.trace.Trace implements AmiTraceInterface, AmiEnabledInterface
ALL, ALWAYS, AMI, DEBUG, DEFAULT_DATE_TIME_FORMAT, DEFAULT_DIRECTORY_NAME, DEFAULT_FILE_NAME, DEFAULT_LEVEL, DEFAULT_MAX_FILE_INDEX, DEFAULT_MAX_FILE_LENGTH, ERROR, INFO, MAX_CODE_STRING_LENGTH, MAX_FILE_INDEX, MAX_LEVEL, MIN_FILE_LENGTH, MIN_LEVEL, TIBCO_DATE_TIME_FORMAT, useStdRollover, WARNINGAMI_ALL, AMI_ALWAYS, AMI_AMI, AMI_DEBUG, AMI_ERROR, AMI_INFO, AMI_MIN_LEVEL, AMI_WARNING| Constructor and Description |
|---|
AmiTrace()
Create an instance of the class AmiTrace with default properties.
|
AmiTrace(COM.TIBCO.hawk.utilities.command.Command command)
Create an instance of the class AmiTrace with properties gotten from the
specified Command object.
|
AmiTrace(COM.TIBCO.hawk.utilities.command.Command command,
java.lang.String NTServiceDisplayName)
Create an instance of the class AmiTrace with NT service display name and
properties gotten from the specified Command object.
|
AmiTrace(int level,
java.lang.String fileName,
long fileSize,
long maxFile)
Create an instance of the class AmiTrace with the given trace
properties.
|
AmiTrace(int level,
java.lang.String dirName,
java.lang.String fileName,
long fileSize,
long maxFile)
Create an instance of the class AmiTrace with the given trace
properties.
|
AmiTrace(java.lang.String NTServiceDisplayName)
Create an instance of the class AmiTrace with NT service display name and
default properties.
|
AmiTrace(COM.TIBCO.hawk.utilities.trace.Trace trace)
Create an instance of the class AmiTrace with an existing Trace object.
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Throwable |
getLowestCause(java.lang.Throwable cause) |
AmiMethodInterface[] |
getMethods()
Returns an array of AmiMethodInterfaces for getting and setting AmiTrace
properties.
|
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 logMsg)
When this method is invoked, the input logMsg should always be logged
regardless of the state of the trace properties.
|
void |
logAlways(java.lang.Throwable e)
When this method is invoked, the input exception's stack trace should
always be logged regardless of the state of the trace properties.
|
void |
logAmi(java.lang.String logMsg)
When this method is invoked, the input logMsg should be logged
only if the state of the trace properties indicates a need for
AMI debugging messages.
|
void |
logAmi(java.lang.Throwable e)
When this method is invoked, the input exception's stack trace should
be logged only if the state of the trace properties indicates a need for
AMI debugging messages.
|
void |
logDebug(java.lang.String logMsg)
When this method is invoked, the input logMsg should be logged
only if the state of the trace properties indicates a need for
debugging messages.
|
void |
logDebug(java.lang.Throwable e)
When this method is invoked, the input exception's stack trace should
be logged only if the state of the trace properties indicates a need for
debugging messages.
|
void |
logError(java.lang.String logMsg)
When this method is invoked, the input logMsg should always be logged
regardless of the state of the trace properties.
|
void |
logError(java.lang.Throwable e)
When this method is invoked, the input exception's stack trace should
always be logged regardless of the state of the trace properties.
|
void |
logInfo(java.lang.String logMsg)
When this method is invoked, the input logMsg should be logged
only if the state of the trace properties indicates a need for
information messages.
|
void |
logInfo(java.lang.Throwable e)
When this method is invoked, the input exception's stack trace should be
logged only if the state of the trace properties indicates a need for
information messages.
|
void |
logWarning(java.lang.String logMsg)
When this method is invoked, the input logMsg should be logged
only if the state of the trace properties indicates a need for
warning messages.
|
void |
logWarning(java.lang.Throwable e)
When this method is invoked, the input exception's stack trace should be
logged only if the state of the trace properties indicates a need for
warning messages.
|
void |
setSession(AmiSession ami)
This method has a noop implementation.
|
getDirectoryName, getFileName, getFileSize, getLevel, getLevelHelpString, getLevelLabelString, getLevelString, getMaxFile, getMaxLevel, getNumberOfLevels, getOutputStream, getStackTrace, isLevelOn, log, log, log, log, log, log, main, setDateTimeFormat, setDirectoryName, setFileName, setFileSize, setLevel, setMaxFile, setTraceStandardDefaults, setUserLevel, setUserLevel, useStdRolloverequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDirectoryName, getFileName, getFileSize, getLevel, getLevelHelpString, getLevelLabelString, getLevelString, getMaxFile, getMaxLevel, getNumberOfLevels, isLevelOn, log, log, log, log, setDirectoryName, setFileName, setFileSize, setLevel, setMaxFile, setUserLevel, setUserLevelpublic AmiTrace()
public AmiTrace(java.lang.String NTServiceDisplayName)
public AmiTrace(COM.TIBCO.hawk.utilities.command.Command command)
throws COM.TIBCO.hawk.utilities.exception.HawkException
COM.TIBCO.hawk.utilities.exception.HawkExceptionpublic AmiTrace(COM.TIBCO.hawk.utilities.command.Command command,
java.lang.String NTServiceDisplayName)
throws COM.TIBCO.hawk.utilities.exception.HawkException
COM.TIBCO.hawk.utilities.exception.HawkExceptionpublic AmiTrace(COM.TIBCO.hawk.utilities.trace.Trace trace)
trace - An existing Trace object.public AmiTrace(int level,
java.lang.String dirName,
java.lang.String fileName,
long fileSize,
long maxFile)
throws COM.TIBCO.hawk.utilities.trace.TraceException
level - The current trace leveldirName - The directory path to use for creating log filesfileName - The file name to use for create log filefileSize - The maximum number of Kbytes before file rollovermaxFile - The maximum number of files to keepCOM.TIBCO.hawk.utilities.trace.TraceException - is thrown if any of the input arguments is
invalid.
public AmiTrace(int level,
java.lang.String fileName,
long fileSize,
long maxFile)
throws COM.TIBCO.hawk.utilities.trace.TraceException
level - The current trace levelfileName - The file name to use for create log filefileSize - The maximum number of Kbytes before file rollovermaxFile - The maximum number of files to keepCOM.TIBCO.hawk.utilities.trace.TraceException - is thrown if any of the input arguments is
invalid.
public void logAlways(java.lang.String logMsg)
logAlways in interface AmiTraceInterfacelogMsg - The message to be loggedpublic void logInfo(java.lang.String logMsg)
logInfo in interface AmiTraceInterfacelogMsg - The message to be loggedpublic void logWarning(java.lang.String logMsg)
logWarning in interface AmiTraceInterfacelogMsg - The message to be loggedpublic void logError(java.lang.String logMsg)
logError in interface AmiTraceInterfacelogMsg - The message to be loggedpublic void logDebug(java.lang.String logMsg)
logDebug in interface AmiTraceInterfacelogMsg - The message to be loggedpublic void logAmi(java.lang.String logMsg)
logAmi in interface AmiTraceInterfacelogMsg - The message to be loggedpublic void logAlways(java.lang.Throwable e)
logAlways in interface AmiTraceInterfacee - The exception to be logged.public void logInfo(java.lang.Throwable e)
logInfo in interface AmiTraceInterfacee - The exception to be logged.public void logWarning(java.lang.Throwable e)
logWarning in interface AmiTraceInterfacee - The exception to be logged.public void logError(java.lang.Throwable e)
logError in interface AmiTraceInterfacee - The exception to be logged.public void logDebug(java.lang.Throwable e)
logDebug in interface AmiTraceInterfacee - The exception to be logged.public void logAmi(java.lang.Throwable e)
logAmi in interface AmiTraceInterfacee - The exception to be logged.public AmiMethodInterface[] getMethods() throws AmiException
getMethods in interface AmiEnabledInterfaceThis method implements the AmiEnabledInterface such that an array of four AmiMethodInterfaces for getting and setting AmiTrace properties are returned.
The AmiMethodInterfaces returned by this method are:
getTraceLevel
setTraceLevel
getTraceParameters
setTraceParameters
AmiExceptionpublic void setSession(AmiSession ami) throws AmiException
setSession in interface AmiEnabledInterfaceami - The current AmiSession object.
The AmiTrace does not need the state of the
AmiSession, therefore this method is a noop in this
implementation.
AmiExceptionpublic 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)
log in interface AmiTraceInterfacebundle - the resource bundleid - the subsystem id or the message idmsg_num - the message code numbercode - a trace level code.params - the parameters to format the message.e - the Throwable object to log.
addStackTrace - true if stack trace dump is to be loggedpublic void log(java.util.ResourceBundle bundle,
java.lang.String id,
int msg_num,
int code,
java.lang.Object[] params)
log in interface AmiTraceInterfacepublic static java.lang.Throwable getLowestCause(java.lang.Throwable cause)
Copyright © 2000-2019 TIBCO Inc. All Rights Reserved.