com.sap.tc.logging
Class StreamLog
java.lang.Object
|
+--com.sap.tc.logging.ExceptionHandling
|
+--com.sap.tc.logging.Log
|
+--com.sap.tc.logging.StreamLog
- All Implemented Interfaces:
- java.lang.Cloneable, ILog, IObjectInfo
- Direct Known Subclasses:
- ConsoleLog, FileLog
- public class StreamLog
- extends Log
Writes log records to output streams.
|
Method Summary |
java.lang.String |
getEncoding()
Gets the canonical name of the character encoding that is used for this
log.
|
void |
setEncoding(java.lang.String enc)
Sets the named character encoding to be used for this log.
|
| Methods inherited from class com.sap.tc.logging.Log |
addFilter, beGroup, beLogged, close, flush, getDescription, getEffectiveSeverity, getFilters, getFooter, getFormatter, getHeader, getLoggedCount, getLogName, getLogTypeAccessibility, getName, getNumberOfLogRecordsWritten, getOwners, getRecord, getVerInUse, isAutoFlush, isClosed, isFiltersAgreeing, isOpened, isSuppressing, open, removeFilter, removeFilters, reset, resetLoggedCount, setAutoFlush, setDescription, setEffectiveSeverity, setFormatter, setLogName, setLogTypeAccessibility, setName, setSuppressing, size, status, write |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StreamLog
public StreamLog(java.io.OutputStream stream)
- Configures this stream log for writing to an output stream.
- Parameters:
stream - Output stream- See Also:
StreamLog(java.io.OutputStream,
java.lang.String)
StreamLog
public StreamLog(java.io.OutputStream stream,
Formatter formatter)
- Same as
StreamLog(java.io.OutputStream)
but configures for writing with a custom formatter.
- Parameters:
stream - Output streamformatter - Formatter- See Also:
StreamLog(java.io.OutputStream,
java.lang.String,
Formatter)
StreamLog
public StreamLog(java.io.OutputStream stream,
java.lang.String enc)
throws java.io.UnsupportedEncodingException
- Configures this stream log for writing to an output stream with a custom
character encoding.
- Parameters:
stream - Output streamenc - Name of character encoding- See Also:
StreamLog(java.io.OutputStream)
StreamLog
public StreamLog(java.io.OutputStream stream,
java.lang.String enc,
Formatter formatter)
throws java.io.UnsupportedEncodingException
- Same as
StreamLog(java.io.OutputStream,
java.lang.String)
but configures for writing with a custom formatter and character encoding.
- Parameters:
stream - Output streamenc - Name of character encodingformatter - Formatter- Throws:
java.io.UnsupportedEncodingException - Character encoding not supported- See Also:
StreamLog(java.io.OutputStream,
Formatter)
getEncoding
public java.lang.String getEncoding()
- Gets the canonical name of the character encoding that is used for this
log.
If no character encoding is set the default character encoding of the
platform is used.
- Overrides:
getEncoding in class Log
- Returns:
- Name of character encoding
- See Also:
setEncoding(java.lang.String)
setEncoding
public void setEncoding(java.lang.String enc)
- Sets the named character encoding to be used for this log.
If no character encoding is set the default character encoding is used.
Note: To use new encoding value, the Log must be first closed using
the
#Log.close() method, then opened with #Log.open() method.
- Overrides:
setEncoding in class Log
- Parameters:
enc - Name of character encoding- See Also:
getEncoding()