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
-
Field Summary
Fields inherited from class java.io.FilterOutputStream
out
-
Constructor Summary
ConstructorsConstructorDescriptionDebugLogStream
(PrintStream out, PrintStream warn, PrintStream err, IDebugLogFormatter formatter) DebugLogStream
(PrintStream printStream0, PrintStream printStream1, PrintStream printStream2, IDebugLogFormatter debugLogFormatter, LogSeverity logSeverity) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
void
Similar to println.void
debugOnceln
(int int0, Object object) void
debugOnceln
(int int0, String string, Object... object) void
debugOnceln
(Object object) void
debugOnceln
(String string, Object... object) void
void
void
Prints an object to the Error stream.void
static String
Returns the class name and method name prefix of the calling code.static String
getStackTraceElementString
(StackTraceElement stackTraceElement, boolean includeLineNo) static String
boolean
boolean
isLogEnabled
(LogSeverity logSeverity) void
void
void
void
void
print
(boolean b) Prints a boolean value.void
print
(char c) Prints a character.void
print
(double d) Prints a double-precision floating-point number.void
print
(float f) Prints a floating-point number.void
print
(int i) Prints an integer.void
print
(long l) Prints a long integer.void
Prints an object.void
Prints a string.void
printException
(Throwable ex, String errorMessage, String callerPrefix, LogSeverity severity) void
printException
(Throwable ex, String errorMessage, LogSeverity severity) void
println()
Terminates the current line by writing the line separator string.void
println
(boolean x) Prints a boolean and then terminate the line.void
println
(char x) Prints a character and then terminate the line.void
println
(char[] x) Prints a character and then terminate the line.void
println
(double x) Prints a double and then terminate the line.void
println
(float x) Prints a float and then terminate the line.void
println
(int x) Prints an integer and then terminate the line.void
println
(long x) Prints a long and then terminate the line.void
Prints an Object and then terminate the line.void
Prints a String and then terminate the line.void
void
void
printStackTrace
(int int0) void
printStackTrace
(String message) void
printStackTrace
(String string, int int0) void
setLogSeverity
(LogSeverity logSeverity) void
void
void
void
static StackTraceElement
tryGetCallerTraceElement
(int depthIdx) void
void
void
Prints an object to the Warning stream.void
void
void
void
void
protected void
write
(PrintStream printStream, LogSeverity logSeverity, String string1) protected void
writeln
(PrintStream printStream, LogSeverity logSeverity, String string1) protected void
writeln
(PrintStream printStream, LogSeverity logSeverity, String string1, Object... object) protected void
writeWithCallerPrefixln
(PrintStream printStream, LogSeverity logSeverity, int int0, boolean boolean0, Object object) protected void
writeWithCallerPrefixln
(PrintStream printStream, LogSeverity logSeverity, int int0, boolean boolean0, String string2, Object... object) Methods inherited from class java.io.PrintStream
append, append, append, charset, checkError, clearError, close, flush, format, format, print, printf, setError, write, write, write, writeBytes
Methods 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 debugLogFormatter, LogSeverity logSeverity)
-
-
Method Details
-
setLogSeverity
-
getLogSeverity
-
getWrappedOutStream
-
getWrappedWarnStream
-
getWrappedErrStream
-
getFormatter
-
write
-
writeln
-
writeln
protected void writeln(PrintStream printStream, LogSeverity logSeverity, String string1, Object... object) -
writeWithCallerPrefixln
protected void writeWithCallerPrefixln(PrintStream printStream, LogSeverity logSeverity, int int0, boolean boolean0, Object object) -
writeWithCallerPrefixln
protected void writeWithCallerPrefixln(PrintStream printStream, LogSeverity logSeverity, int int0, boolean boolean0, String string2, Object... object) -
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:
print
in 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:
print
in classPrintStream
- Parameters:
c
- The char to be printed
-
print
public void print(int i) Prints an integer. The string produced by- Overrides:
print
in classPrintStream
- Parameters:
i
- The int to be printed
-
print
public void print(long l) Prints a long integer. The string produced by- Overrides:
print
in classPrintStream
- Parameters:
l
- The long to be printed
-
print
public void print(float f) Prints a floating-point number. The string produced by- Overrides:
print
in 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:
print
in classPrintStream
- Parameters:
d
- The double to be printed
-
print
Prints a string. If the argument is- Overrides:
print
in classPrintStream
- Parameters:
s
- The String to be printed
-
print
Prints an object. The string produced by the- Overrides:
print
in classPrintStream
- Parameters:
obj
- The Object to be printed
-
printf
- Overrides:
printf
in 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:
println
in classPrintStream
-
println
public void println(boolean x) Prints a boolean and then terminate the line. This method behaves as though it invokes- Overrides:
println
in 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:
println
in 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:
println
in 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:
println
in 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:
println
in 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:
println
in 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:
println
in 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:
println
in 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:
println
in classPrintStream
- Parameters:
x
- The Object to be printed.
-
println
-
printException
-
printException
public void printException(Throwable ex, String errorMessage, String callerPrefix, LogSeverity severity)
-