Deprecated
no replacement
LogStream provides a mechanism for logging errors that are
of possible interest to those monitoring a system.
| Modifier and Type | Field and Description |
|---|---|
| public static final int | BRIEF
log level constant (brief logging). |
| private StringBuffer | buffer
string buffer used for constructing log message prefixes |
| private ByteArrayOutputStream | bufOut
stream used for buffering lines |
| private static PrintStream | defaultStream
default output stream for new logs |
| private static Map | known
table mapping known log names to log stream objects |
| private OutputStream | logOut
stream where output of this log is sent to |
| private OutputStreamWriter | logWriter
string writer for writing message prefixes to log stream |
| private String | name
log name for this log |
| public static final int | SILENT
log level constant (no logging). |
| public static final int | VERBOSE
log level constant (verbose logging). |
| Access | Constructor and Description |
|---|---|
| private | LogStream(String
string identifying messages from this log name, OutputStream out)
Deprecated
no replacement
Create a new LogStream object. |
| Modifier and Type | Method and Description |
|---|---|
| public static synchronized PrintStream | Returns: default log stream
Deprecated
no replacement
Return the current default stream for new logs. |
| public synchronized OutputStream | Returns: output stream for this log
Deprecated
no replacement
Return the current stream to which output from this log is sent. |
| public static LogStream | |
| public static int | Returns: corresponding integer log levelname of logging level (e.g., 'SILENT', 'BRIEF', 'VERBOSE') s)
Deprecated
no replacement
Convert a string name of a logging level to its internal integer representation. |
| public static synchronized void | setDefaultStream(PrintStream
new default log stream newDefault)
Deprecated
no replacement
Set the default stream for new logs. |
| public synchronized void | setOutputStream(OutputStream
new output stream for this log out)
Deprecated
no replacement
Set the stream to which output from this log is sent. |
| public String | Returns: log nameOverrides java.
Deprecated
no replacement
Return log name as string representation. |
| public void | write(int b)
Overrides java.
Deprecated
no replacement
Write a byte of data to the stream. |
| public void | write(byte[] b, int off, int len)
Overrides java.
Deprecated
no replacement
Write a subarray of bytes. |
| BRIEF | back to summary |
|---|---|
| public static final int BRIEF log level constant (brief logging). | |
| buffer | back to summary |
|---|---|
| private StringBuffer buffer string buffer used for constructing log message prefixes | |
| bufOut | back to summary |
|---|---|
| private ByteArrayOutputStream bufOut stream used for buffering lines | |
| defaultStream | back to summary |
|---|---|
| private static PrintStream defaultStream default output stream for new logs | |
| known | back to summary |
|---|---|
| private static Map<String, LogStream> known table mapping known log names to log stream objects | |
| logOut | back to summary |
|---|---|
| private OutputStream logOut stream where output of this log is sent to | |
| logWriter | back to summary |
|---|---|
| private OutputStreamWriter logWriter string writer for writing message prefixes to log stream | |
| name | back to summary |
|---|---|
| private String name log name for this log | |
| SILENT | back to summary |
|---|---|
| public static final int SILENT log level constant (no logging). | |
| VERBOSE | back to summary |
|---|---|
| public static final int VERBOSE log level constant (verbose logging). | |
| LogStream | back to summary |
|---|---|
| private LogStream(String name, OutputStream out)
Deprecated no replacement Create a new LogStream object. Since this only constructor is private, users must have a LogStream created through the "log" method.
| |
| getDefaultStream | back to summary |
|---|---|
| public static synchronized PrintStream getDefaultStream()
Deprecated no replacement Return the current default stream for new logs.
| |
| getOutputStream | back to summary |
|---|---|
| public synchronized OutputStream getOutputStream()
Deprecated no replacement Return the current stream to which output from this log is sent.
| |
| log | back to summary |
|---|---|
| public static LogStream log(String name)
Deprecated no replacement Return the LogStream identified by the given name. If a log corresponding to "name" does not exist, a log using the default stream is created. | |
| parseLevel | back to summary |
|---|---|
| public static int parseLevel(String s)
Deprecated no replacement Convert a string name of a logging level to its internal integer representation.
| |
| setDefaultStream | back to summary |
|---|---|
| public static synchronized void setDefaultStream(PrintStream newDefault)
Deprecated no replacement Set the default stream for new logs.
| |
| setOutputStream | back to summary |
|---|---|
| public synchronized void setOutputStream(OutputStream out)
Deprecated no replacement Set the stream to which output from this log is sent.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Deprecated no replacement Return log name as string representation.
| |
| write | back to summary |
|---|---|
| public void write(int b) Overrides java. Deprecated no replacement Write a byte of data to the stream. If it is not a newline, then the byte is appended to the internal buffer. If it is a newline, then the currently buffered line is sent to the log's output stream, prefixed with the appropriate logging information.
| |
| write | back to summary |
|---|---|
| public void write(byte[] b, int off, int len) Overrides java. Deprecated no replacement Write a subarray of bytes. Pass each through write byte method.
| |