Class LogStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.FilterOutputStream
-
- java.io.PrintStream
-
- java.rmi.server.LogStream
- All Implemented Interfaces:
-
Closeable
,Flushable
,Appendable
,AutoCloseable
@Deprecated public class LogStream extends PrintStream
LogStream
provides a mechanism for logging errors that are of possible interest to those monitoring a system.
- Since:
- 1.1
Fields
Modifier and Type | Field | Description |
---|---|---|
static int | BRIEF | Deprecated. log level constant (brief logging). |
static int | SILENT | Deprecated. log level constant (no logging). |
static int | VERBOSE | Deprecated. log level constant (verbose logging). |
Fields declared in class java.io.FilterOutputStream
out
Methods
Modifier and Type | Method | Description |
---|---|---|
static PrintStream | getDefaultStream() | Deprecated. no replacement |
OutputStream | getOutputStream() | Deprecated. no replacement |
static LogStream | log(String name) | Deprecated. no replacement |
static int | parseLevel(String s) | Deprecated. no replacement |
static void | setDefaultStream(PrintStream newDefault) | Deprecated. no replacement |
void | setOutputStream(OutputStream out) | Deprecated. no replacement |
String | toString() | Deprecated. no replacement |
void | write(byte[] b,
int off,
int len) | Deprecated. no replacement |
void | write(int b) | Deprecated. no replacement |
Methods declared in 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
Methods declared in class java.io.FilterOutputStream
write
Methods declared in class java.io.OutputStream
nullOutputStream
Methods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Fields
SILENT
public static final int SILENT
log level constant (no logging).
- See Also:
- Constant Field Values
BRIEF
public static final int BRIEF
log level constant (brief logging).
- See Also:
- Constant Field Values
VERBOSE
public static final int VERBOSE
log level constant (verbose logging).
- See Also:
- Constant Field Values
Methods
log
@Deprecated public static LogStream log(String name)
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.
- Parameters:
-
name
- name identifying the desired LogStream - Returns:
- log associated with given name
- Since:
- 1.1
getDefaultStream
@Deprecated public static PrintStream getDefaultStream()
Return the current default stream for new logs.
- Returns:
- default log stream
- Since:
- 1.1
- See Also:
setDefaultStream(java.io.PrintStream)
setDefaultStream
@Deprecated public static void setDefaultStream(PrintStream newDefault)
Set the default stream for new logs.
- Parameters:
-
newDefault
- new default log stream - Since:
- 1.1
- See Also:
getDefaultStream()
getOutputStream
@Deprecated public OutputStream getOutputStream()
Return the current stream to which output from this log is sent.
- Returns:
- output stream for this log
- Since:
- 1.1
- See Also:
setOutputStream(java.io.OutputStream)
setOutputStream
@Deprecated public void setOutputStream(OutputStream out)
Set the stream to which output from this log is sent.
- Parameters:
-
out
- new output stream for this log - Since:
- 1.1
- See Also:
getOutputStream()
write
@Deprecated public void write(int b)
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.
- Overrides:
-
write
in classPrintStream
- Parameters:
-
b
- The byte to be written - Since:
- 1.1
- See Also:
-
PrintStream.print(char)
,PrintStream.println(char)
write
@Deprecated public void write(byte[] b, int off, int len)
Write a subarray of bytes. Pass each through write byte method.
- Overrides:
-
write
in classPrintStream
- Parameters:
-
b
- A byte array -
off
- Offset from which to start taking bytes -
len
- Number of bytes to write - Since:
- 1.1
- See Also:
FilterOutputStream.write(int)
toString
@Deprecated public String toString()
Return log name as string representation.
parseLevel
@Deprecated public static int parseLevel(String s)
Convert a string name of a logging level to its internal integer representation.
- Parameters:
-
s
- name of logging level (e.g., 'SILENT', 'BRIEF', 'VERBOSE') - Returns:
- corresponding integer log level
- Since:
- 1.1
© 1993, 2020, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/11/docs/api/java.rmi/java/rmi/server/LogStream.html