|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TraceManager
The TraceManager
interface defines the methods that allow
applications trace management.
Typically, an application obtains only one TraceManager object. All Trace objects are created by default: Predefined Trace in accordance with Syslog definitions are:
ContitionalTraces: INFORMATIONAL, DEBUGGING, NOTIFICATION, WARNING UnconditionalTraces: ERROR, CRITICAL, ALERTS, EMERGENCIES
Facilities/Sub-Facilities:
Facility: is a code consisting of two or more uppercase letters that indicate the facility to which the message refers. A facility can be a hardware device, a protocol, or a module of the system software
SubFacility:is a code consisting of two or more uppercase letters that indicate the sub-facility to which the message refers. A sub-facility can be a hardware device component, a protocol unit, or a sub-module of the system software
By default all 8 Conditional and UnConditional Traces are created for the Facility and 8 for each of the subFacilities In order to use the DEBUGGING trace for the parent FACILITY, for example, the application needs to use the getConditionalTrace( "DEBUGGING" ) method of this object.
In order to use the DEBUGGING trace for the SUBFACILITY, for example, the application needs to use the getConditionalTrace( SUBFACILITY + "_" + "DEBUGGING" ) method of this object or use the getConditionalTrace( SUBFACILITY , "DEBUGGING" ) method.
System wide TraceWriterManager is set through the setTraceWriterManager method provided by this interface.
The Trace Manager object also allows the application to enable or disable tracing for all trace through the enableAll() and disableAll() methods.
Method Summary | |
---|---|
void |
addSubFacilities(java.lang.String[] names)
Sets a set of subFacilities for this TraceManager/Facility. |
void |
addSubFacility(java.lang.String name)
Adds a single subFacility for this TraceManager/Facility. |
void |
disableAll()
Disables tracing for all Trace objects managed by this TraceManager. |
void |
disableTimeStamp()
Disables prefixing a time stamp for every message printed by this TraceManager. |
void |
enableAll()
Enables tracing for all Trace objects managed by this TraceManager. |
void |
enableTimeStamp()
Enables prefixing a time stamp for every message printed by this TraceManager. |
ConditionalTrace |
getConditionalTrace(int severity)
Creates a new ConditionalTrace object or obtains an existing ConditionalTrace object for this condition. |
ConditionalTrace |
getConditionalTrace(java.lang.String subFacility,
int severity)
Creates a new ConditionalTrace object or obtains an existing ConditionalTrace object for this condition and subFacility |
java.lang.String |
getName()
Returns the Facility name for this TraceManager. |
java.lang.String[] |
getSubFacilities()
Returns the subFacility names for this TraceManager/Facility. |
java.util.Enumeration |
getTraces()
Returns an enumeration of the Trace objects managed by this TraceManager. |
TraceWriterManager |
getTraceWriterManager()
Returns the TraceWriter used by this TraceManager. |
UnconditionalTrace |
getUnconditionalTrace(int severity)
Creates a new UnconditionalTrace object or obtains an existing UnconditionalTrace object for this condition. |
UnconditionalTrace |
getUnconditionalTrace(java.lang.String subFacility,
int severity)
Creates a new UnconditionalTrace object or obtains an existing UnconditionalTrace object for this condition and subFacility |
void |
removeTrace(Trace tc)
Removes a Trace object given an object. |
void |
setSubFacilities(java.lang.String[] names)
Deprecated. and replaced with TraceManager.addSubFacilities method |
void |
setSubFacility(java.lang.String name)
Deprecated. and replaced with TraceManager.addSubFacility method |
void |
setTraceWriterManager(TraceWriterManager twm)
Sets the TraceWriter to be used by this TraceManager. |
Method Detail |
---|
ConditionalTrace getConditionalTrace(int severity)
ConditionalTrace getConditionalTrace(java.lang.String subFacility, int severity)
UnconditionalTrace getUnconditionalTrace(int severity)
UnconditionalTrace getUnconditionalTrace(java.lang.String subFacility, int severity)
TraceWriterManager getTraceWriterManager()
void setTraceWriterManager(TraceWriterManager twm)
void removeTrace(Trace tc)
java.util.Enumeration getTraces()
void enableAll()
void disableAll()
java.lang.String getName()
void enableTimeStamp()
void disableTimeStamp()
java.lang.String[] getSubFacilities()
void setSubFacilities(java.lang.String[] names)
TraceManager.addSubFacilities
method
void addSubFacilities(java.lang.String[] names)
void setSubFacility(java.lang.String name)
TraceManager.addSubFacility
method
void addSubFacility(java.lang.String name)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |