|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.edustructures.sifworks.log.DefaultServerLogModule
public class DefaultServerLogModule
The default ServerLogModule implementation for server logging. An instance of this class is installed by default when the ADK is initialized.
DefaultServerLogModule writes to the server log by constructing and
reporting a SIF_LogEntry object as an Add SIF_Event when the log
method is called. Because SIF_LogEntry was introduced in SIF 1.5, an
event is only reported when the agent's default SIF Version is 1.5 or
later. No action is taken for earlier versions.
By default, DefaultServerLogModule echos all messages to the zone's
local Log4j Category. Call the setEcho method to disable
this functionality. Follow these steps to obtain the DefaultServerLogModule
that is installed by the ADK when it is initialized:
ADK.getServerLog to obtain the ServerLog
instance at the root of the logging chain
ServerLog.getLoggers method to obtain
an array of all ServerLogModules
getID method on each element in the
array until you encounter one that returns "DefaultServerLogModule".
Alternatively, you can use instanceof to test each
element to determine if it is an instance of this class.
setEcho to enable/disable echoing of
SIF_LogEntry information to the local zone log. (SIF_LogEntry
is always echoed when the ADK is initialized to use a version
of SIF prior to 1.5)
setReportEvents to enable/disable the reporting
of SIF_LogEntry events to the zone. This method can be used to
disable SIF_LogEntry reporting to zones while continuing to allow
log messages to be echoed to the local zone log.
| Constructor Summary | |
|---|---|
DefaultServerLogModule()
|
|
| Method Summary | |
|---|---|
boolean |
getEcho()
Determines if SIF_LogEntry objects should be echoed to the local client-side zone log |
java.lang.String |
getID()
Gets the ID of this logger |
boolean |
getReportEvents()
Determines if SIF_LogEntry objects are reported to the zone. |
void |
log(Zone zone,
SIF_LogEntry data)
Post a SIF_LogEntry to the server. |
void |
log(Zone zone,
java.lang.String message)
Post a string message to the server log. |
void |
setEcho(boolean echo)
Determines if SIF_LogEntry objects should be echoed to the local client-side zone log |
void |
setReportEvents(boolean report)
Determines if SIF_LogEntry objects are reported to the zone. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultServerLogModule()
| Method Detail |
|---|
public java.lang.String getID()
getID in interface ServerLogModulepublic void setEcho(boolean echo)
echo - true to echo SIF_LogEntry information to the client-size
zone log; false to disable echoing. Note that SIF_LogEntry is always
echoed to the local zone log when the ADK is initialized with a version of SIF
prior to 1.5.public boolean getEcho()
true to echo SIF_LogEntry information to the client-size
zone log; false to disable echoing. Note that SIF_LogEntry is always
echoed to the local zone log when the ADK is initialized with a version of SIF
prior to 1.5.public void setReportEvents(boolean report)
report - true to report SIF_LogEntry events, false
to disable reporting of eventspublic boolean getReportEvents()
true to report SIF_LogEntry events, false
to disable reporting of events
public void log(Zone zone,
java.lang.String message)
The implementation of this method constructs a SIF_LogEntry object
with the LogLevel attribute set to "Info" and the
SIF_Desc element set to the text message passed to
the message parameter. The SIF_LogEntry object is then
reported to the zone as a SIF_Event by delegating to the log
method that accepts a SIF_LogEntry parameter.
log in interface ServerLogModulezone - The zone on the server to post the message tomessage - The message text
public void log(Zone zone,
SIF_LogEntry data)
log in interface ServerLogModulezone - The Zone to post log information todata - The SIF_LogEntry object to post as an Add Event
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||