| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public class LogStream extends PrintStream
LogStream
provides a mechanism for logging errors that are
of possible interest to those monitoring a system.
Field Summary | |
---|---|
static int |
BRIEF
log level constant (brief logging). |
static int |
SILENT
log level constant (no logging). |
static int |
VERBOSE
log level constant (verbose logging). |
Fields inherited from class java.io.FilterOutputStream |
---|
out |
Method Summary | |
---|---|
static PrintStream |
Return the current default stream for new logs. |
OutputStream |
Return the current stream to which output from this log is sent. |
static LogStream |
Return the LogStream identified by the given name. |
static int |
parseLevel(String s) Convert a string name of a logging level to its internal integer representation. |
static void |
setDefaultStream(PrintStream newDefault) Set the default stream for new logs. |
void |
Set the stream to which output from this log is sent. |
String |
toString() Return log name as string representation. |
void |
write(byte[] b, int off, int len) Write a subarray of bytes. |
void |
write(int b) Write a byte of data to the stream. |
Methods inherited from class java.io.PrintStream |
---|
append, append, append, checkError, clearError, close, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, println, setError, write, write |
Methods inherited from class java.io.FilterOutputStream |
---|
close, flush, write, write, write |
Methods inherited from class java.io.OutputStream |
---|
close, flush, write, write, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int BRIEF
public static final int SILENT
public static final int VERBOSE
Method Detail |
---|
public static synchronized PrintStream getDefaultStream()
public synchronized OutputStream getOutputStream()
public static LogStream log(String name)
name
- name identifying the desired LogStreampublic static int parseLevel(String s)
s
- name of logging level (e.g., 'SILENT', 'BRIEF', 'VERBOSE')public static synchronized void setDefaultStream(PrintStream newDefault)
newDefault
- new default log streampublic synchronized void setOutputStream(OutputStream out)
out
- new output stream for this logpublic String toString()
toString
in class Object
public void write(byte[] b, int off, int len)
write
in class PrintStream
b
off
len
public void write(int b)
write
in class PrintStream
b
| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |