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 out, PrintStream warn, PrintStream err, IDebugLogFormatter formatter, LogSeverity logSeverity) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidvoiddebugOnceln(int in_backTraceOffset, Object in_formatNoParams) voiddebugOnceln(int in_backTraceOffset, String in_format, Object... in_params) voiddebugOnceln(Object in_formatNoParams) voiddebugOnceln(String in_format, Object... in_params) voidvoidvoidPrints an object to the Error stream.voidstatic StringReturns the class name and method name prefix of the calling code.static StringgetStackTraceElementString(StackTraceElement stackTraceElement, boolean in_includeLogTraceFileLocation) static StringbooleanbooleanisLogEnabled(LogSeverity in_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 depth) voidprintStackTrace(String message) voidprintStackTrace(String message, int depth) voidsetLogSeverity(LogSeverity in_newSeverity) voidvoidvoidvoidstatic StackTraceElementtryGetCallerTraceElement(int depthIdx) voidvoidvoidPrints an object to the Warning stream.voidvoidvoidvoidvoidMethods inherited from class PrintStream
append, append, append, charset, checkError, close, flush, format, format, print, printf, write, write, write, writeBytesMethods inherited from class OutputStream
nullOutputStream
-
Constructor Details
-
DebugLogStream
public DebugLogStream(PrintStream out, PrintStream warn, PrintStream err, IDebugLogFormatter formatter) -
DebugLogStream
public DebugLogStream(PrintStream out, PrintStream warn, PrintStream err, IDebugLogFormatter formatter, 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 in_includeLogTraceFileLocation) -
getTopStackTraceString
-
printStackTrace
public void printStackTrace() -
printStackTrace
-
printStackTrace
public void printStackTrace(int depth) -
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 String.valueOf(Object) method is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the PrintStream.write(int) method.- Parameters:
in_formatNoParams- The Object to be printed
-
warn
-
warnOnce
-
warnOnce
-
error
Prints an object to the Error stream. The string produced by the String.valueOf(Object) method is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the PrintStream.write(int) method.- Parameters:
in_formatNoParams- 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 String.valueOf(boolean) is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the PrintStream.write(int) method.- 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 PrintStream.write(int) method.- Overrides:
printin classPrintStream- Parameters:
c- The char to be printed
-
print
public void print(int i) Prints an integer. The string produced by String.valueOf(int) is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the PrintStream.write(int) method.- Overrides:
printin classPrintStream- Parameters:
i- The int to be printed
-
print
public void print(long l) Prints a long integer. The string produced by String.valueOf(long) is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the PrintStream.write(int) method.- 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 String.valueOf(float) is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the PrintStream.write(int) method.- 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 String.valueOf(double) is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the PrintStream.write(int) method.- Overrides:
printin classPrintStream- Parameters:
d- The double to be printed
-
print
Prints a string. If the argument is null then the string "null" is printed. Otherwise, the string's characters are converted into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the PrintStream.write(int) method.- Overrides:
printin classPrintStream- Parameters:
s- The String to be printed
-
print
Prints an object. The string produced by the String.valueOf(Object) method is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the PrintStream.write(int) method.- 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 line.separator, and is not necessarily a single newline character ('\n').- Overrides:
printlnin classPrintStream
-
println
public void println(boolean x) Prints a boolean and then terminate the line. This method behaves as though it invokes print(boolean) and then println().- 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 print(char) and then println().- 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 print(int) and then println().- 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 print(long) and then println().- 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 print(float) and then println().- 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 print(double) and then println().- 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 print(char) and then println().- 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 print(String) and then println().- 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 print(String) and then println().- Overrides:
printlnin classPrintStream- Parameters:
x- The Object to be printed.
-
println
-
printException
-
printException
public void printException(Throwable ex, String errorMessage, String callerPrefix, LogSeverity severity)
-