public class LogOutputStream extends LineProcOutputStream
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
closeLogFileFlag
Flag set 'true' to close LogFile when this output stream is closed.
|
protected int |
logLevel
The logging level to use.
|
protected LogFile |
outFile
The LogFile object to use.
|
EOL, EOL_LEN, lineBuffer| Constructor and Description |
|---|
LogOutputStream(LogFile logFileObj)
Creates an output stream that sends data to a LogFile object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
callBackMethod(java.lang.String s)
Implements the CallbackStringParam interface.
|
void |
close()
Overidden version that also flushes any buffered data and closes the
LogFile object (if 'closeLogFileFlag' is 'true').
|
void |
closeLogFile()
Closes the LogFile used by this object.
|
LogFile |
getLogfile()
Returns a reference to the logfile in use.
|
void |
setCloseLogFileFlag(boolean flgVal)
Configures whether or not the 'LogFile' object held by this output
stream will be closed when the stream is closed.
|
void |
setLoggingLevel(int newLevel)
Set the logging level used for outputs to the log file.
|
flush, writeprotected final LogFile outFile
protected int logLevel
protected boolean closeLogFileFlag
public LogOutputStream(LogFile logFileObj)
logFileObj - the LogFile object to use.public void callBackMethod(java.lang.String s)
s - string parameter to use.public LogFile getLogfile()
public void setLoggingLevel(int newLevel)
newLevel - the new logging level.public void setCloseLogFileFlag(boolean flgVal)
flgVal - true to close the 'LogFile' object when this output
stream is closed; false to not.public void closeLogFile()
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.OutputStreamjava.io.IOException