public class LogConsole
extends java.io.PrintStream
implements java.io.Serializable
LogWriter that captures System.out and
System.err output and redirects the output to the MAIN log using the
LogWriter.DEBUG severity level.
The LogWriter.init method optionally creates an instance of this
class, depending on the boolean value passed to the method. Other
classes should not reference this class or any of its methods.
| Modifier and Type | Field and Description |
|---|---|
private static long |
serialVersionUID
The class' serialization version id.
|
| Constructor and Description |
|---|
LogConsole()
Constructs a new instance of the console logger.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkError()
Flushes this output stream and checks its error state.
|
void |
close()
Closes this output stream and releases any system resources associated
with this stream.
|
void |
flush()
Flushes this output stream and forces any buffered output bytes to be
written out.
|
private void |
log(java.lang.String s)
Logs a string to the MAIN log using
LogWriter.DEBUG severity. |
void |
print(boolean b)
Logs a boolean value.
|
void |
print(char c)
Logs a character value.
|
void |
print(char[] s)
Logs a character array value.
|
void |
print(double d)
Logs a double value.
|
void |
print(float f)
Logs a float value.
|
void |
print(int i)
Logs an integer value.
|
void |
print(long l)
Logs a long value.
|
void |
print(java.lang.Object obj)
Logs an object value.
|
void |
print(java.lang.String s)
Logs a string value.
|
void |
println(boolean x)
Logs a boolean value.
|
void |
println(char x)
Logs a character value.
|
void |
println(char[] x)
Logs a character array value.
|
void |
println(double x)
Logs a double value.
|
void |
println(float x)
Logs a float value.
|
void |
println(int x)
Logs an integer value.
|
void |
println(long x)
Logs a long value.
|
void |
println(java.lang.Object x)
Logs an object value.
|
void |
println(java.lang.String x)
Logs a string value.
|
void |
write(byte[] b,
int off,
int len)
Logs a subset of a byte array.
|
void |
write(int b)
Logs a byte value.
|
private static final long serialVersionUID
public LogConsole()
System.out output stream and the System.err output stream to
this class.private void log(java.lang.String s)
LogWriter.DEBUG severity.s - (String) The string to log.public boolean checkError()
close() in PrintStream. This implementation
always returns false.checkError in class java.io.PrintStreamfalse.public void close()
close() in PrintStream. This implementation
does nothing.close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.PrintStreampublic void flush()
flush() in PrintStream. This implementation
does nothing.flush in interface java.io.Flushableflush in class java.io.PrintStreampublic void print(boolean b)
print(boolean b) in PrintStream.print in class java.io.PrintStreamb - (boolean) The boolean to log.public void print(char c)
print(char c) in PrintStream.print in class java.io.PrintStreamc - (char) The character to log.public void print(char[] s)
print(char s[]) in PrintStream.print in class java.io.PrintStreams - (char[]) The character array to log.public void print(double d)
print(double d) in PrintStream.print in class java.io.PrintStreamd - (double) The double to log.public void print(float f)
print(float f) in PrintStream.print in class java.io.PrintStreamf - (float) The float to log.public void print(int i)
print(int i) in PrintStream.print in class java.io.PrintStreami - (int) The integer to log.public void print(long l)
print(long l) in PrintStream.print in class java.io.PrintStreaml - (long) The long to log.public void print(java.lang.Object obj)
print(Object obj) in PrintStream.print in class java.io.PrintStreamobj - (Object) The object to log.public void print(java.lang.String s)
print(String s) in PrintStream.print in class java.io.PrintStreams - (String) The string to log.public void println(boolean x)
println(boolean x) in PrintStream.println in class java.io.PrintStreamx - (boolean) The boolean to log.public void println(char x)
println(char x) in PrintStream.println in class java.io.PrintStreamx - (char) The character to log.public void println(char[] x)
println(char x[]) in PrintStream.println in class java.io.PrintStreamx - (char[]) The character array to log.public void println(double x)
println(double x) in PrintStream.println in class java.io.PrintStreamx - (double) The double to log.public void println(float x)
println(float x) in PrintStream.println in class java.io.PrintStreamx - (float) The float to log.public void println(int x)
println(int x) in PrintStream.println in class java.io.PrintStreamx - (int) The integer to log.public void println(long x)
println(long x) in PrintStream.println in class java.io.PrintStreamx - (long) The long to log.public void println(java.lang.Object x)
println(Object x) in PrintStream.println in class java.io.PrintStreamx - (Object) The object to log.public void println(java.lang.String x)
println(String x) in PrintStream.println in class java.io.PrintStreamx - (String) The string to log.public void write(int b)
write(int b) in PrintStream.write in class java.io.PrintStreamb - (int) The byte to log.public void write(byte[] b,
int off,
int len)
write(byte[] b, int off, int len) in PrintStream.write in class java.io.PrintStreamb - (byte[]) The byte array containing the subset to to log.off - (int) The first position of the subset.len - (int) The length of the subset.