public abstract class AbstractSTAFTextLogItem extends STAFFileLogItem
Note that logging function of this class is for local use only.
debugLog, handle, LINEFEED, SAFSLOG_MAJOR_VER, SAFSLOG_MINOR_VER, STAFVersion| Constructor and Description |
|---|
AbstractSTAFTextLogItem(java.lang.String file)
Creates a disabled
AbstractSTAFTextLogItem with default name (file
name) and log level (LOGLEVEL_INFO), and empty parent
directory. |
AbstractSTAFTextLogItem(java.lang.String parent,
java.lang.String file)
Creates a disabled
AbstractSTAFTextLogItem with default name (file
name) and log level (LOGLEVEL_INFO). |
AbstractSTAFTextLogItem(java.lang.String name,
java.lang.String parent,
java.lang.String file)
Creates a disabled
AbstractSTAFTextLogItem with default log level
(LOGLEVEL_INFO). |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close this log if enabled and open.
|
protected java.util.List<java.lang.String> |
getCloseMessages()
Return the messages to write before the log is closed.
|
protected java.util.List<java.lang.String> |
getInitMessages()
Return the messages to write after the log is initialized.
|
void |
init()
Initializes this log and writes the log open message.
|
void |
logMessage(java.lang.String msg)
Logs a message in standard SAFS text log format if enabled and open.
|
void |
logMessage(java.lang.String msg,
int msgType)
Logs a message in standard SAFS text log format if enabled and open.
|
void |
logMessage(java.lang.String msg,
java.lang.String desc,
int msgType)
Logs a message in standard SAFS text log format if enabled and open.
|
appendFinalLog, exportSTAFLog, finalizeLogFile, getMachineName, getSTAFLogDirectory, getTestName, prependFinalLog, readStringFromSTAFLog, readUIntFromSTAFLog, setDebugLog, setHandle, stafLogLog, stafLogLog, stafLogRequest, write, writeCloseMessages, writeInitMessagesfileExists, getAbsolutePath, getFileSpec, getParentDir, isFileSpecAbsolute, setParentDirpublic AbstractSTAFTextLogItem(java.lang.String name,
java.lang.String parent,
java.lang.String file)
AbstractSTAFTextLogItem with default log level
(LOGLEVEL_INFO).
The type of this log item is always LOGMODE_SAFS_TEXT.
name - the name of this log.parent - the parent directory for this log.file - the file spec of this log.public AbstractSTAFTextLogItem(java.lang.String parent,
java.lang.String file)
AbstractSTAFTextLogItem with default name (file
name) and log level (LOGLEVEL_INFO).
The type of this log item is always LOGMODE_SAFS_TEXT.
parent - the parent directory for this log.file - the file spec of this log.public AbstractSTAFTextLogItem(java.lang.String file)
AbstractSTAFTextLogItem with default name (file
name) and log level (LOGLEVEL_INFO), and empty parent
directory.
The type of this log item is always LOGMODE_SAFS_TEXT.
file - the file spec of this log.public void init()
init in class STAFFileLogItempublic void logMessage(java.lang.String msg,
java.lang.String desc,
int msgType)
logMessage in class LogItemmsg - the message to log.desc - additional description to log.msgType - the int identifier of the type of message being logged.public void logMessage(java.lang.String msg,
int msgType)
msg - the message to log.msgType - the int identifier of the type of message being logged.public void logMessage(java.lang.String msg)
Message type defaults to GENERIC_MESSAGE.
msg - the message to log.public void close()
throws STAFLogException
close in class STAFFileLogItemSTAFLogException - if this method failed for any reason.protected java.util.List<java.lang.String> getInitMessages()
STAFFileLogItemgetInitMessages in class STAFFileLogItemprotected java.util.List<java.lang.String> getCloseMessages()
STAFFileLogItemgetCloseMessages in class STAFFileLogItemCopyright © SAS Institute. All Rights Reserved.