Class DebugLogStream

All Implemented Interfaces:
Closeable, Flushable, Appendable, AutoCloseable
Direct Known Subclasses:
AutoRepiperDebugLogStream

public class DebugLogStream extends PrintStream
  • Constructor Details

  • Method Details

    • setLogSeverity

      public void setLogSeverity(LogSeverity newSeverity)
    • 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.
    • tryGetCallerTraceElement

      public static StackTraceElement tryGetCallerTraceElement(int depthIdx)
    • getStackTraceElementString

      public static String getStackTraceElementString(StackTraceElement stackTraceElement, 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 formatNoParams)
    • trace

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

      public void debugln(Object formatNoParams)
    • debugln

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

      public void debugOnceln(Object formatNoParams)
    • debugOnceln

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

      public void noise(Object formatNoParams)
    • noise

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

      public void warn(Object formatNoParams)
      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:
      formatNoParams - The Object to be printed
    • warn

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

      public void warnOnce(Object formatNoParams)
    • warnOnce

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

      public void error(Object formatNoParams)
      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:
      formatNoParams - The Object to be printed
    • error

      public void error(String format, Object... params)
    • debugln

      public void debugln(int backTraceOffset, Object formatNoParams)
    • debugln

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

      public void debugOnceln(int backTraceOffset, Object formatNoParams)
    • debugOnceln

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

      public void noise(int backTraceOffset, Object formatNoParams)
    • noise

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

      public void warn(int backTraceOffset, Object formatNoParams)
    • warn

      public void warn(int backTraceOffset, String format, Object... params)
    • error

      public void error(int backTraceOffset, Object formatNoParams)
    • error

      public void error(int backTraceOffset, String format, Object... params)
    • trace

      public void trace(int backTraceOffset, Object formatNoParams)
    • trace

      public void trace(int backTraceOffset, String format, Object... params)
    • warnOnce

      public void warnOnce(int backTraceOffset, Object formatNoParams)
    • warnOnce

      public void warnOnce(int backTraceOffset, String 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(String 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)