|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.edustructures.sifworks.log.ServerLog
public class ServerLog
Provides access to the Zone Integration Server log.
ServerLog functionality can be customized and extended by adding one or more ServerLogModule implementations to the chain of loggers. The logging chain is hierarchical, comprised of ServerLog instances at the ADK, Agent, and Zone levels. Whenever a server-side logging operation is performed on a zone, it is delegated to the ServerLogModule instances at each level in the hierarchy, beginning with the Zone.
To customize server-side logging on a global basis, call the
ADK.getServerLog static function and use the methods below to
manipulate ServerLogModule instances at the root level of the
hierarchy:
addLoggerremoveLoggerclearLoggersgetLoggersAgent.getServerLog or Agent.getServerLog( Zone )
methods to obtain the ServerLog for the Agent or a Zone, respectively.
| Method Summary | |
|---|---|
void |
addLogger(ServerLogModule logger)
Adda a ServerLogModule to the chain of loggers. |
void |
clearLoggers()
Clear all ServerLogModule modules from the chain of loggers. |
java.lang.String |
getID()
Returns the ID of this logger instance |
static ServerLog |
getInstance(java.lang.String id,
Zone zone)
Get a ServerLog instance with the specified ID. |
ServerLogModule[] |
getLoggers()
Get a list of all registered ServerLogModule modules that comprise the chain of loggers. |
void |
log(LogLevel level,
java.lang.String message,
SIFMessageInfo info,
SIFDataObject[] objects)
Post a SIF_LogEntry to the server. |
void |
log(LogLevel level,
java.lang.String desc,
java.lang.String extDesc,
java.lang.String appCode)
Post a SIF_LogEntry to the server. |
void |
log(LogLevel level,
java.lang.String desc,
java.lang.String extDesc,
java.lang.String appCode,
int category,
int code)
Post a SIF_LogEntry to the server. |
void |
log(LogLevel level,
java.lang.String desc,
java.lang.String extDesc,
java.lang.String appCode,
int category,
int code,
SIFMessageInfo info,
SIFDataObject... objects)
Post a SIF_LogEntry to the server. |
void |
log(LogLevel level,
java.lang.String desc,
java.lang.String extDesc,
java.lang.String appCode,
SIFMessageInfo info,
SIFDataObject[] objects)
Post a SIF_LogEntry to the server. |
void |
log(java.lang.String message)
Post a SIF_LogEntry to the server. |
void |
removeLogger(ServerLogModule logger)
Remove a ServerLogModule from the chain of loggers. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public java.lang.String getID()
public static ServerLog getInstance(java.lang.String id,
Zone zone)
This method is intended to be called internally by the ADK. You
should call the ADK.getServerLog, Agent.getServerLog,
or Zone.getServerLog methods to obtain a ServerLog instance
rather than directly calling this method.
id - The ID identifying the ServerLog to returnzone - The zone that the ServerLog is attached to
public void addLogger(ServerLogModule logger)
logger - A ServerLogModule implementationremoveLogger(com.edustructures.sifworks.log.ServerLogModule),
clearLoggers(),
getLoggers()public void removeLogger(ServerLogModule logger)
logger - A ServerLogModule implementationaddLogger(com.edustructures.sifworks.log.ServerLogModule),
clearLoggers(),
getLoggers()public void clearLoggers()
addLogger(com.edustructures.sifworks.log.ServerLogModule),
removeLogger(com.edustructures.sifworks.log.ServerLogModule),
getLoggers()public ServerLogModule[] getLoggers()
addLogger(com.edustructures.sifworks.log.ServerLogModule),
removeLogger(com.edustructures.sifworks.log.ServerLogModule),
clearLoggers()public void log(java.lang.String message)
Use this form of the log method to post a simple
informative message to the server.
message - A textual description of the error
public void log(LogLevel level,
java.lang.String desc,
java.lang.String extDesc,
java.lang.String appCode)
Use this form of the log method to post an
error, warning, or informative message to the server with an
description, extended description, and optional application-defined
error code.
level - The LogLevel to assign to this log entrydesc - A textual description of the errorextDesc - Extended error description, or null if no
value is to be assigned to the SIF_LogEntry/SIF_ExtDesc elementappCode - Error code specific to the application posting the log
entry, or null if no value is to be assigned to the
SIF_LogEntry/SIF_ApplicationCode element
public void log(LogLevel level,
java.lang.String desc,
java.lang.String extDesc,
java.lang.String appCode,
int category,
int code)
Use this form of the log method to post an
error, warning, or informative message to the server with an category
and code enumerated by the SIF Specification.
level - The LogLevel to assign to this log entrydesc - A textual description of the errorextDesc - Extended error description, or null if no
value is to be assigned to the SIF_LogEntry/SIF_ExtDesc elementappCode - Error code specific to the application posting the log
entry, or null if no value is to be assigned to the
SIF_LogEntry/SIF_ApplicationCode elementcategory - The SIF_Category value to assign to this log entry, as
defined by the SIF Specificationcode - The SIF_Code value to assign to this log entry, as defined
by the SIF Specification
public void log(LogLevel level,
java.lang.String message,
SIFMessageInfo info,
SIFDataObject[] objects)
Use this form of the log method to post a simple
error, warning, or informative message to the server that references a
SIF Message and optionally a set of SIF Data Objects previously received
by the agent.
level - The LogLevel to assign to this log entrymessage - A textual description of the errorinfo - The SIFMessageInfo instance from the ADK message
handler implementation identifying a SIF Message received by the agentobjects - One or more SIFDataObject instances received in the message
identified by the info parameter
public void log(LogLevel level,
java.lang.String desc,
java.lang.String extDesc,
java.lang.String appCode,
SIFMessageInfo info,
SIFDataObject[] objects)
Use this form of the log method to post an
error, warning, or informative message to the server that references a
SIF Message and optionally a set of SIF Data Objects previously received
by the agent. The log entry can also have an extended error description
and application-defined error code.
level - The LogLevel to assign to this log entrydesc - A textual description of the errorextDesc - Extended error description, or null if no
value is to be assigned to the SIF_LogEntry/SIF_ExtDesc elementappCode - Error code specific to the application posting the log
entry, or null if no value is to be assigned to the
SIF_LogEntry/SIF_ApplicationCode elementinfo - The SIFMessageInfo instance from the ADK message
handler implementation identifying a SIF Message received by the agentobjects - One or more SIFDataObject instances received in the message
identified by the info parameter
public void log(LogLevel level,
java.lang.String desc,
java.lang.String extDesc,
java.lang.String appCode,
int category,
int code,
SIFMessageInfo info,
SIFDataObject... objects)
Use this form of the log method to post an error, warning,
or informative message to the server that references a
SIF Message and optionally a set of SIF Data Objects previously received
by the agent. The log entry is assigned a category and code defined by
the SIF Specification, and may have an extended error description and
optional application-defined error code.
level - The LogLevel to assign to this log entrydesc - A textual description of the errorextDesc - Extended error description, or null if no
value is to be assigned to the SIF_LogEntry/SIF_ExtDesc elementappCode - Error code specific to the application posting the log
entry, or null if no value is to be assigned to the
SIF_LogEntry/SIF_ApplicationCode elementcategory - The SIF_Category value to assign to this log entry, as
defined by the SIF Specificationcode - The SIF_Code value to assign to this log entry, as
defined by the SIF Specificationinfo - The SIFMessageInfo instance from the ADK message
handler implementation identifying a SIF Message received by the agentobjects - One or more SIFDataObject instances received in the message
identified by the info parameter. This argument may be specified
as an array or sequence of SIFDataObjects
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||