|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.safs.staf.service.logging.SAFSCustomLoggingService
public class SAFSCustomLoggingService
SAFSCustomLoggingService
is an external STAF service that
handles custom SAFS logging.
This class and CustomLogFac
provide a sample implementation of custom
logging service that writes directly to the same STAF logs that standard
logging service writes to.
Registration of this service takes the following format:
SERVICE <ServiceName> LIBRARY JSTAF EXECUTE <ServiceJarFile> PARMS
SAFSLOGGING <SAFSLoggingService>
SAFSLOGGING
option is required because this service uses the
unique STAF LOG service instance loaded by SAFS logging service to access
the running STAF logs.
Example:
SERVICE SAFSCustomLogs LIBRARY JSTAF EXECUTE
c:\staf\services\SAFSCustomLogs.jar PARMS SAFSLOGGING SAFSLogs
This service provides the following commands:
INIT <facname> MODE <mode> [LINKEDFAC <name>] LOGMESSAGE <facname> MESSAGE <msg> [DESCRIPTION <desc>] [MSGTYPE <msgType>] CLOSE <facname> HELP VERSION
CustomLogFac
,
SAFSLoggingService
,
"SAFSLogs Service User's Guide"Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.ibm.staf.service.STAFServiceInterfaceLevel3 |
---|
com.ibm.staf.service.STAFServiceInterfaceLevel3.InitInfo, com.ibm.staf.service.STAFServiceInterfaceLevel3.RequestInfo |
Field Summary | |
---|---|
static java.lang.String |
SCLS_SERVICE_OPTION_SAFSLOGGING
|
static java.lang.String |
SCLS_SERVICE_PARM_DESCRIPTION
|
static java.lang.String |
SCLS_SERVICE_PARM_LINKEDFAC
|
static java.lang.String |
SCLS_SERVICE_PARM_MESSAGE
|
static java.lang.String |
SCLS_SERVICE_PARM_MODE
|
static java.lang.String |
SCLS_SERVICE_PARM_MSGTYPE
|
static java.lang.String |
SCLS_SERVICE_REQUEST_CLOSE
|
static java.lang.String |
SCLS_SERVICE_REQUEST_HELP
|
static java.lang.String |
SCLS_SERVICE_REQUEST_INIT
|
static java.lang.String |
SCLS_SERVICE_REQUEST_LOGMESSAGE
|
static java.lang.String |
SCLS_SERVICE_REQUEST_VERSION
|
static java.lang.String |
SCLS_SERVICE_RESPONSE_BYPASS
|
Constructor Summary | |
---|---|
SAFSCustomLoggingService()
|
Method Summary | |
---|---|
com.ibm.staf.STAFResult |
acceptRequest(com.ibm.staf.service.STAFServiceInterfaceLevel3.RequestInfo info)
Handles service request from STAF. |
static void |
debugPrintln(java.lang.String msg)
Prints a line to the debug log if debugging is enabled. |
static void |
debugPrintln(java.lang.String msg,
java.lang.Exception e)
Prints a message and Exception to the debug log if debugging is enabled. |
static void |
debugPrintln(java.lang.String msg,
com.ibm.staf.STAFResult r)
Prints a message and STAFResult to the debug log if debugging is enabled. |
int |
init(com.ibm.staf.service.STAFServiceInterfaceLevel3.InitInfo info)
Handles initializing this instance of the service for STAF. |
int |
term()
Handles removing this service from STAF. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SCLS_SERVICE_OPTION_SAFSLOGGING
public static final java.lang.String SCLS_SERVICE_REQUEST_INIT
public static final java.lang.String SCLS_SERVICE_REQUEST_LOGMESSAGE
public static final java.lang.String SCLS_SERVICE_REQUEST_CLOSE
public static final java.lang.String SCLS_SERVICE_REQUEST_HELP
public static final java.lang.String SCLS_SERVICE_REQUEST_VERSION
public static final java.lang.String SCLS_SERVICE_PARM_MODE
public static final java.lang.String SCLS_SERVICE_PARM_LINKEDFAC
public static final java.lang.String SCLS_SERVICE_PARM_MESSAGE
public static final java.lang.String SCLS_SERVICE_PARM_DESCRIPTION
public static final java.lang.String SCLS_SERVICE_PARM_MSGTYPE
public static final java.lang.String SCLS_SERVICE_RESPONSE_BYPASS
Constructor Detail |
---|
public SAFSCustomLoggingService()
Method Detail |
---|
public final int init(com.ibm.staf.service.STAFServiceInterfaceLevel3.InitInfo info)
This service is registered under process name "STAF/Service/<ServiceName>".
init
in interface com.ibm.staf.service.STAFServiceInterfaceLevel3
public com.ibm.staf.STAFResult acceptRequest(com.ibm.staf.service.STAFServiceInterfaceLevel3.RequestInfo info)
acceptRequest
in interface com.ibm.staf.service.STAFServiceInterfaceLevel3
public final int term()
term
in interface com.ibm.staf.service.STAFServiceInterfaceLevel3
public static void debugPrintln(java.lang.String msg)
msg
- the message to print.public static void debugPrintln(java.lang.String msg, com.ibm.staf.STAFResult r)
msg
- the message to print.t
- the STAFResult to print.public static void debugPrintln(java.lang.String msg, java.lang.Exception e)
msg
- the message to print.e
- the Exception to print.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |