|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.safs.logging.LogItem org.safs.logging.FileLogItem org.safs.staf.service.logging.STAFFileLogItem org.safs.staf.service.logging.STAFTextLogItem
public class STAFTextLogItem
This class encapsulates a standard SAFS text file log implemented using STAF. Log messages are written to a temporary STAF log while the log is running. Upon closing, the content of of the STAF log is formatted to the SAFS text log standard and exported to the destination log file.
Note that logging function of this class is for local use only.
Field Summary |
---|
Fields inherited from class org.safs.staf.service.logging.STAFFileLogItem |
---|
handle, LINEFEED, SAFSLOG_MAJOR_VER, SAFSLOG_MINOR_VER |
Fields inherited from class org.safs.logging.LogItem |
---|
closed, enabled, level, mode, name |
Constructor Summary | |
---|---|
STAFTextLogItem(java.lang.String file)
Creates a disabled STAFTextLogItem with default name (file
name) and log level (LOGLEVEL_INFO ), and empty parent
directory. |
|
STAFTextLogItem(java.lang.String parent,
java.lang.String file)
Creates a disabled STAFTextLogItem with default name (file
name) and log level (LOGLEVEL_INFO ). |
|
STAFTextLogItem(java.lang.String name,
java.lang.String parent,
java.lang.String file)
Creates a disabled STAFTextLogItem with default log level
(LOGLEVEL_INFO ). |
Method Summary | |
---|---|
void |
close()
Close this log if enabled and open. |
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. |
Methods inherited from class org.safs.staf.service.logging.STAFFileLogItem |
---|
appendFinalLog, exportSTAFLog, finalizeLogFile, prependFinalLog, readStringFromSTAFLog, readUIntFromSTAFLog, setHandle, stafLogLog, stafLogLog, stafLogRequest |
Methods inherited from class org.safs.logging.FileLogItem |
---|
fileExists, getAbsolutePath, getFileSpec, getParentDir, isFileSpecAbsolute, setParentDir |
Methods inherited from class org.safs.logging.LogItem |
---|
dateTime, isClosed |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public STAFTextLogItem(java.lang.String name, java.lang.String parent, java.lang.String file)
STAFTextLogItem
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 STAFTextLogItem(java.lang.String parent, java.lang.String file)
STAFTextLogItem
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 STAFTextLogItem(java.lang.String file)
STAFTextLogItem
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.Method Detail |
---|
public void init()
init
in class STAFFileLogItem
public void logMessage(java.lang.String msg, java.lang.String desc, int msgType)
logMessage
in class LogItem
msg
- 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 STAFFileLogItem
STAFLogException
- if this method failed for any reason.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |