| CONTENTS | PREV | NEXT | Java Remote Method Invocation |
LogStream Class
The classLogStreampresents a mechanism for logging errors that are of possible interest to those monitoring the system. This class is used internally for server call logging.
package java.rmi.server; public class LogStream extends java.io.PrintStream { public static LogStream log(String name); public static synchronized PrintStream getDefaultStream(); public static synchronized void setDefaultStream( PrintStream newDefault); public synchronized OutputStream getOutputStream(); public synchronized void setOutputStream(OutputStream out); public void write(int b); public void write(byte b[], int off, int len); public String toString(); public static int parseLevel(String s);// constants for logging levels public static final int SILENT = 0; public static final int BRIEF = 10; public static final int VERBOSE = 20; }
Note - TheLogStreamclass is deprecated in the Java 2 platform.
The methodlogreturns the LogStream identified by the given name. If a log corresponding to name does not exist, a log using the default stream is created.The method
getDefaultStreamreturns the current default stream for new logs.The method
setDefaultStreamsets the default stream for new logs.The method
getOutputStreamreturns current stream to which output from this log is sent.The method
setOutputStreamsets the stream to which output from this log is sent.The first form of the method
writewrites a byte of data to the stream. If it is not a new line, then the byte is appended to the internal buffer. If it is a new line, then the currently buffered line is sent to the log's output stream with the appropriate logging prefix. The second form of the methodwritewrites a subarray of bytes.The method
toStringreturns log name as string representation.The method
parseLevelconverts a string name of a logging level to its internal integer representation.
CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.