Class DebugLogStream

All Implemented Interfaces:
Closeable, Flushable, Appendable, AutoCloseable

public class DebugLogStream extends PrintStream
  • Constructor Details

  • Method Details

    • setLogSeverity

      public void setLogSeverity(LogSeverity newSeverity)
    • getDebugType

      public DebugType getDebugType()
    • getLogSeverity

      public LogSeverity getLogSeverity()
    • getWrappedOutStream

      public PrintStream getWrappedOutStream()
    • getWrappedWarnStream

      public PrintStream getWrappedWarnStream()
    • getWrappedErrStream

      public PrintStream getWrappedErrStream()
    • getFormatter

      public IDebugLogFormatter getFormatter()
    • generateCallerPrefix

      public static String generateCallerPrefix()
      Returns the class name and method name prefix of the calling code.
    • getStackTraceElementString

      public static String getStackTraceElementString(StackTraceElement[] stackTraceElements, int atIDx, boolean includeLogTraceFileLocation)
    • getTopStackTraceString

      public static String getTopStackTraceString(Throwable ex)
    • printStackTrace

      public void printStackTrace(LogSeverity severity, int depthStart, int depthCount, String messageFormat, Object... params)
    • isEnabled

      public boolean isEnabled()
    • isLogEnabled

      public boolean isLogEnabled(LogSeverity logSeverity)
    • trace

      public void trace(Object format, Object... params)
    • debugln

      public void debugln(Object format, Object... params)
    • debugOnceln

      public void debugOnceln(Object format, Object... params)
    • noise

      public void noise(Object format, Object... params)
    • warn

      public void warn(Object format, Object... params)
    • warnOnce

      public void warnOnce(Object format, Object... params)
    • error

      public void error(Object format, Object... params)
    • debuglnWithTraceOffset

      public void debuglnWithTraceOffset(int backTraceOffset, Object format, Object... params)
    • debugOncelnWithTraceOffset

      public void debugOncelnWithTraceOffset(int backTraceOffset, Object format, Object... params)
    • noiseWithTraceOffset

      public void noiseWithTraceOffset(int backTraceOffset, Object format, Object... params)
    • warnWithTraceOffset

      public void warnWithTraceOffset(int backTraceOffset, Object format, Object... params)
    • errorWithTraceOffset

      public void errorWithTraceOffset(int backTraceOffset, Object format, Object... params)
    • traceWithTraceOffset

      public void traceWithTraceOffset(int backTraceOffset, Object format, Object... params)
    • warnOnceWithTraceOffset

      public void warnOnceWithTraceOffset(int backTraceOffset, Object format, Object... params)
    • 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:
      print in class PrintStream
      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:
      print in class PrintStream
      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:
      print in class PrintStream
      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:
      print in class PrintStream
      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:
      print in class PrintStream
      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:
      print in class PrintStream
      Parameters:
      d - The double to be printed
    • print

      public void print(String s)
      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:
      print in class PrintStream
      Parameters:
      s - The String to be printed
    • print

      public void print(Object obj)
      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:
      print in class PrintStream
      Parameters:
      obj - The Object to be printed
    • printf

      public PrintStream printf(String format, Object... args)
      Overrides:
      printf in class PrintStream
    • 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:
      println in class PrintStream
    • 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:
      println in class PrintStream
      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:
      println in class PrintStream
      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:
      println in class PrintStream
      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:
      println in class PrintStream
      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:
      println in class PrintStream
      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:
      println in class PrintStream
      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:
      println in class PrintStream
      Parameters:
      x - The char to be printed.
    • println

      public void println(String x)
      Prints a String and then terminate the line. This method behaves as though it invokes print(String) and then println().
      Overrides:
      println in class PrintStream
      Parameters:
      x - The String to be printed.
    • println

      public void println(Object x)
      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:
      println in class PrintStream
      Parameters:
      x - The Object to be printed.
    • println

      public void println(Object format, Object... params)
    • printException

      public void printException(Throwable ex, String errorMessage, LogSeverity severity)
    • printException

      public void printException(Throwable ex, String errorMessage, String callerPrefix, LogSeverity severity)
    • printException

      public void printException(Throwable ex, LogSeverity severity, String callerPrefix, String errorMessageFormat, Object... params)