Class DebugLogStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
java.io.PrintStream
zombie.debug.DebugLogStream
- All Implemented Interfaces:
Closeable,Flushable,Appendable,AutoCloseable
- Direct Known Subclasses:
AutoRepiperDebugLogStream
-
Constructor Summary
ConstructorsConstructorDescriptionDebugLogStream(PrintStream out, PrintStream warn, PrintStream err, IDebugLogFormatter formatter) DebugLogStream(PrintStream printStream0, PrintStream printStream1, PrintStream printStream2, IDebugLogFormatter iDebugLogFormatter, LogSeverity logSeverity) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidSimilar to println.voiddebugOnceln(int int0, Object object) voiddebugOnceln(int int0, String string, Object... objects) voiddebugOnceln(Object object) voiddebugOnceln(String string, Object... objects) voidvoidvoidPrints an object to the Error stream.voidPrints an object to the Error stream, usingstatic StringReturns the class name and method name prefix of the calling code.static StringgetStackTraceElementString(StackTraceElement stackTraceElement, boolean includeLineNo) static StringbooleanbooleanisLogEnabled(LogSeverity logSeverity) voidvoidvoidvoidvoidprint(boolean b) Prints a boolean value.voidprint(char c) Prints a character.voidprint(double d) Prints a double-precision floating-point number.voidprint(float f) Prints a floating-point number.voidprint(int i) Prints an integer.voidprint(long l) Prints a long integer.voidPrints an object.voidPrints a string.voidprintException(Throwable ex, String errorMessage, String callerPrefix, LogSeverity severity) voidprintException(Throwable ex, String errorMessage, LogSeverity severity) voidprintln()Terminates the current line by writing the line separator string.voidprintln(boolean x) Prints a boolean and then terminate the line.voidprintln(char x) Prints a character and then terminate the line.voidprintln(char[] x) Prints a character and then terminate the line.voidprintln(double x) Prints a double and then terminate the line.voidprintln(float x) Prints a float and then terminate the line.voidprintln(int x) Prints an integer and then terminate the line.voidprintln(long x) Prints a long and then terminate the line.voidPrints an Object and then terminate the line.voidPrints a String and then terminate the line.voidvoidvoidprintStackTrace(int int0) voidprintStackTrace(String message) voidprintStackTrace(String string, int int0) voidsetLogSeverity(LogSeverity logSeverity) voidvoidvoidvoidstatic StackTraceElementtryGetCallerTraceElement(int depthIdx) voidvoidvoidPrints an object to the Warning stream.voidPrints an object to the Warning stream.voidvoidvoidvoidMethods inherited from class java.io.PrintStream
append, append, append, charset, checkError, close, flush, format, format, print, printf, write, write, write, writeBytesMethods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
DebugLogStream
public DebugLogStream(PrintStream out, PrintStream warn, PrintStream err, IDebugLogFormatter formatter) -
DebugLogStream
public DebugLogStream(PrintStream printStream0, PrintStream printStream1, PrintStream printStream2, IDebugLogFormatter iDebugLogFormatter, LogSeverity logSeverity)
-
-
Method Details
-
setLogSeverity
-
getLogSeverity
-
getWrappedOutStream
-
getWrappedWarnStream
-
getWrappedErrStream
-
getFormatter
-
generateCallerPrefix
Returns the class name and method name prefix of the calling code. -
tryGetCallerTraceElement
-
getStackTraceElementString
public static String getStackTraceElementString(StackTraceElement stackTraceElement, boolean includeLineNo) -
getTopStackTraceString
-
printStackTrace
public void printStackTrace() -
printStackTrace
-
printStackTrace
public void printStackTrace(int int0) -
printStackTrace
-
isEnabled
public boolean isEnabled() -
isLogEnabled
-
trace
-
trace
-
debugln
-
debugln
-
debugOnceln
-
debugOnceln
-
noise
-
noise
-
warn
Prints an object to the Warning stream. The string produced by the- Parameters:
obj- The Object to be printed
-
warn
-
warnOnce
-
warnOnce
-
error
Prints an object to the Error stream. The string produced by the- Parameters:
obj- The Object to be printed
-
error
-
debugln
-
debugln
-
debugOnceln
-
debugOnceln
-
noise
-
noise
-
warn
-
warn
-
error
-
error
-
trace
-
trace
-
warnOnce
-
warnOnce
-
print
public void print(boolean b) Prints a boolean value. The string produced by- Overrides:
printin classPrintStream- Parameters:
b- The boolean to be printed
-
print
public void print(char c) Prints a character. The character is translated into one or more bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the- Overrides:
printin classPrintStream- Parameters:
c- The char to be printed
-
print
public void print(int i) Prints an integer. The string produced by- Overrides:
printin classPrintStream- Parameters:
i- The int to be printed
-
print
public void print(long l) Prints a long integer. The string produced by- Overrides:
printin classPrintStream- Parameters:
l- The long to be printed
-
print
public void print(float f) Prints a floating-point number. The string produced by- Overrides:
printin classPrintStream- Parameters:
f- The float to be printed
-
print
public void print(double d) Prints a double-precision floating-point number. The string produced by- Overrides:
printin classPrintStream- Parameters:
d- The double to be printed
-
print
Prints a string. If the argument is- Overrides:
printin classPrintStream- Parameters:
s- The String to be printed
-
print
Prints an object. The string produced by the- Overrides:
printin classPrintStream- Parameters:
obj- The Object to be printed
-
printf
- Overrides:
printfin classPrintStream
-
println
public void println()Terminates the current line by writing the line separator string. The line separator string is defined by the system property- Overrides:
printlnin classPrintStream
-
println
public void println(boolean x) Prints a boolean and then terminate the line. This method behaves as though it invokes- Overrides:
printlnin classPrintStream- Parameters:
x- The boolean to be printed
-
println
public void println(char x) Prints a character and then terminate the line. This method behaves as though it invokes- Overrides:
printlnin classPrintStream- Parameters:
x- The char to be printed.
-
println
public void println(int x) Prints an integer and then terminate the line. This method behaves as though it invokes- Overrides:
printlnin classPrintStream- Parameters:
x- The int to be printed.
-
println
public void println(long x) Prints a long and then terminate the line. This method behaves as though it invokes- Overrides:
printlnin classPrintStream- Parameters:
x- a The long to be printed.
-
println
public void println(float x) Prints a float and then terminate the line. This method behaves as though it invokes- Overrides:
printlnin classPrintStream- Parameters:
x- The float to be printed.
-
println
public void println(double x) Prints a double and then terminate the line. This method behaves as though it invokes- Overrides:
printlnin classPrintStream- Parameters:
x- The double to be printed.
-
println
public void println(char[] x) Prints a character and then terminate the line. This method behaves as though it invokes- Overrides:
printlnin classPrintStream- Parameters:
x- The char to be printed.
-
println
Prints a String and then terminate the line. This method behaves as though it invokes- Overrides:
printlnin classPrintStream- Parameters:
x- The String to be printed.
-
println
Prints an Object and then terminate the line. This method calls at first String.valueOf(x) to get the printed object's string value, then behaves as though it invokes- Overrides:
printlnin classPrintStream- Parameters:
x- The Object to be printed.
-
println
-
printException
-
printException
public void printException(Throwable ex, String errorMessage, String callerPrefix, LogSeverity severity)
-