public abstract class AbstractSAFSCustomLoggingService
extends java.lang.Object
AbstractSAFSCustomLoggingService
is an external STAF service that
handles custom SAFS logging.
This class is defined as an abstract class, for different version of STAF,
you may extends this class and implements the staf-version-related interface
(STAFServiceInterfaceLevel or STAFServiceInterfaceLevel30).
We have implemented the class for version 2 and 3: SAFSCustomLoggingService and SAFSCustomLoggingService3
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
,
SAFSLoggingService3
,
"SAFSLogs Service User's Guide",
SAFSCustomLoggingService
,
SAFSCustomLoggingService3
Modifier and Type | Field and Description |
---|---|
protected ServiceDebugLog |
debugLog |
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 and Description |
---|
AbstractSAFSCustomLoggingService() |
Modifier and Type | Method and Description |
---|---|
com.ibm.staf.STAFResult |
acceptRequest(InfoInterface.RequestInfo info)
Handles service request from STAF.
|
com.ibm.staf.STAFResult |
init(InfoInterface.InitInfo info)
Handles initializing this instance of the service for STAF.
|
com.ibm.staf.STAFResult |
terminate()
Handles removing this service from STAF.
|
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
protected ServiceDebugLog debugLog
public com.ibm.staf.STAFResult init(InfoInterface.InitInfo info)
This service is registered under process name "STAF/Service/<ServiceName>".
public com.ibm.staf.STAFResult acceptRequest(InfoInterface.RequestInfo info)
public com.ibm.staf.STAFResult terminate()
Copyright © SAS Institute. All Rights Reserved.