public class LocalSLSLogFacility extends SLSLogFacility
LocalSLSLogFacility
provides a concrete implementation of
SLSLogFacility
that is to be used by the SAFS logging service in
local mode.
This class delefates its logging function to STAFTextLogItem
and
STAFXmlLogItem
.
AbstractSTAFTextLogItem
,
AbstractSTAFXmlLogItem
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, workerThread
CUSTOM_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 |
---|
LocalSLSLogFacility(java.lang.String name,
long mode,
int level,
java.lang.String linked,
HandleInterface h,
java.lang.String dir,
LogItemDictionary logs,
java.lang.String csvc,
boolean overwrite,
ServiceDebugLog debugLog)
Creates a
LocalSLSLogFacility . |
LocalSLSLogFacility(java.lang.String name,
long mode,
int level,
java.lang.String linked,
HandleInterface h,
java.lang.String dir,
LogItemDictionary logs,
java.lang.String csvc,
ServiceDebugLog debugLog)
Creates a
LocalSLSLogFacility . |
Modifier and Type | Method and Description |
---|---|
void |
closeNow()
Closes all logs immediately.
|
close, getConsoleLogStateString, getSAFSTextLogStateString, getSAFSXmlLogStateString, getStatesString, getToolLogStateString, logMessage, setDebugLog, setDefaultDir, setHandle, setLogLevel, setLogMode, setSAFSXmlLogCapXML
getFacName, getLinkedFacName, getLogLevel, getLogMode, isModeEnabled, isSuspended, resume, suspend, toString
public LocalSLSLogFacility(java.lang.String name, long mode, int level, java.lang.String linked, HandleInterface h, java.lang.String dir, LogItemDictionary logs, java.lang.String csvc, ServiceDebugLog debugLog) throws STAFLogException
LocalSLSLogFacility
.
This method initilaizes enabled STAF log items and creates and starts the worker thread.
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.csvc
- the name of the custom logging service;
null
if custom logging is to be disabled.debugLog
- is used to write debug message to a fileSTAFLogException
public LocalSLSLogFacility(java.lang.String name, long mode, int level, java.lang.String linked, HandleInterface h, java.lang.String dir, LogItemDictionary logs, java.lang.String csvc, boolean overwrite, ServiceDebugLog debugLog) throws STAFLogException
LocalSLSLogFacility
.
This method initilaizes enabled STAF log items and creates and starts the worker thread. 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.csvc
- the name of the custom logging service;
null
if custom logging is to be disabled.overwrite
- true to delete/overwrite any previous log.debugLog
- is used to write debug message to a fileSTAFLogException
public void closeNow() throws STAFLogException
closeNow
in class SLSLogFacility
STAFLogException
- if a log failed to close for any reason.Copyright © SAS Institute. All Rights Reserved.