public class RemoteSLSLogFacility extends SLSLogFacility
RemoteSLSLogFacility provides a concrete implementation of
SLSLogFacility that is to be used by the SAFS logging service in
remote mode.
This log facility serves as a proxy to the remote logging service running on
the remote machine. Log facility creation, logging, and closing are all
delegated to the remote logging service. Attributes of the remote log
facility are stored and retrieved locally, however, to maximize the
performance of requests that query the state of a log facility. For the same
reason, the STAFTextLogItem and STAFXmlLogItem that
this log facility holds are only place holders for their attributes. Their
logging functions are not used by this log facility because they are only for
local logging mode.
SLSLogFacility.RequestQueue, SLSLogFacility.WorkerRequest, SLSLogFacility.WorkerThread| Modifier and Type | Field and Description |
|---|---|
protected boolean |
overwrite |
allLogs, debugLog, defaultDir, handle, rQueue, STAF_TEXT_LOG_ITEM_V2, STAF_TEXT_LOG_ITEM_V3, STAF_XML_LOG_ITEM_V2, STAF_XML_LOG_ITEM_V3, workerThreadCUSTOM_MESSAGE, DEBUG_MESSAGE, DEFAULT_FAC_NAME, DEFAULT_SAFS_TEXT_FILE, DEFAULT_SAFS_TEXT_NAME, DEFAULT_SAFS_XML_FILE, DEFAULT_SAFS_XML_NAME, DEFAULT_XML_LOG_FOOTER, DEFAULT_XML_LOG_HEADER, END_COUNTER, END_CYCLE, END_DATATABLE, END_PROCEDURE, END_REQUIREMENT, END_SUITE, END_TESTCASE, facName, FAILED_MESSAGE, FAILED_OK_MESSAGE, GENERIC_MESSAGE, linkedFac, logLevel, LOGLEVEL_DEBUG, LOGLEVEL_ERROR, LOGLEVEL_INFO, LOGLEVEL_WARN, logMode, LOGMODE_CONSOLE, LOGMODE_DISABLED, LOGMODE_MAX, LOGMODE_SAFS_TEXT, LOGMODE_SAFS_XML, LOGMODE_TOOL, PASSED_MESSAGE, RESUME_STATUS_COUNTS, SKIPPED_TEST_MESSAGE, START_COUNTER, START_CYCLE, START_DATATABLE, START_LOGGING, START_PROCEDURE, START_REQUIREMENT, START_SUITE, START_TESTCASE, STATUS_REPORT_END, STATUS_REPORT_GENERAL, STATUS_REPORT_GENERAL_FAILURES, STATUS_REPORT_GENERAL_PASSES, STATUS_REPORT_GENERAL_WARNINGS, STATUS_REPORT_IO_FAILURES, STATUS_REPORT_RECORDS, STATUS_REPORT_SKIPPED, STATUS_REPORT_START, STATUS_REPORT_TEST_FAILURES, STATUS_REPORT_TEST_PASSES, STATUS_REPORT_TEST_WARNINGS, STATUS_REPORT_TESTS, STOP_LOGGING, SUSPEND_STATUS_COUNTS, suspended, WARNING_MESSAGE, WARNING_OK_MESSAGE| Constructor and Description |
|---|
RemoteSLSLogFacility(java.lang.String name,
long mode,
int level,
java.lang.String linked,
HandleInterface h,
java.lang.String dir,
LogItemDictionary logs,
java.lang.String machine,
java.lang.String service,
boolean overwrite,
ServiceDebugLog debugLog)
Creates a
RemoteSLSLogFacility. |
RemoteSLSLogFacility(java.lang.String name,
long mode,
int level,
java.lang.String linked,
HandleInterface handle,
java.lang.String dir,
LogItemDictionary logs,
java.lang.String machine,
java.lang.String service,
ServiceDebugLog debugLog)
Creates a
RemoteSLSLogFacility. |
| Modifier and Type | Method and Description |
|---|---|
void |
closeNow()
Closes this log facility immediately by submitting a CLOSE request to
the remote logging service.
|
close, getConsoleLogStateString, getSAFSTextLogStateString, getSAFSXmlLogStateString, getStatesString, getToolLogStateString, logMessage, setDebugLog, setDefaultDir, setHandle, setLogLevel, setLogMode, setSAFSXmlLogCapXMLgetFacName, getLinkedFacName, getLogLevel, getLogMode, isModeEnabled, isSuspended, resume, suspend, toStringpublic RemoteSLSLogFacility(java.lang.String name,
long mode,
int level,
java.lang.String linked,
HandleInterface handle,
java.lang.String dir,
LogItemDictionary logs,
java.lang.String machine,
java.lang.String service,
ServiceDebugLog debugLog)
throws STAFLogException
RemoteSLSLogFacility.
This method creates a log facility on the remote machine by submitting the INIT request to the remote logging service.
name - the name of this log facility.mode - the log mode.level - the log level for this log facility.linked - the name of another log facility linked to this one.handle - a STAF handle to interact with STAF.dir - the default log directory. Overwrites the parent
directory attribute of all log items of this facility.logs - the spec of a STAFTextLogItem and
STAFXmlLogItem. If a log item is omitted,
default settings (file name, parent directory etc) will
be used.machine - the name of the remote machine.service - the name of the remote logging service.debugLog - is used to write debug message to a fileSTAFLogExceptionpublic RemoteSLSLogFacility(java.lang.String name,
long mode,
int level,
java.lang.String linked,
HandleInterface h,
java.lang.String dir,
LogItemDictionary logs,
java.lang.String machine,
java.lang.String service,
boolean overwrite,
ServiceDebugLog debugLog)
throws STAFLogException
RemoteSLSLogFacility.
This method creates a log facility on the remote machine by submitting the INIT request to the remote logging service. It allows you to enable overwriting any previously existing log file instead of aborting. Overwriting is disabled (false) by default.
name - the name of this log facility.mode - the log mode.level - the log level for this log facility.linked - the name of another log facility linked to this one.h - a STAF handle to interact with STAF.dir - the default log directory. Overwrites the parent
directory attribute of all log items of this facility.logs - the spec of a STAFTextLogItem and
STAFXmlLogItem. If a log item is omitted,
default settings (file name, parent directory etc) will
be used.machine - the name of the remote machine.service - the name of the remote logging service.overwrite - true to delete/overwrite any previous log.debugLog - is used to write debug message to a fileSTAFLogExceptionpublic void closeNow()
throws STAFLogException
closeNow in class SLSLogFacilitySTAFLogException - if the remote CLOSE request failed.Copyright © SAS Institute. All Rights Reserved.