Class Debug

java.lang.Object
com.biglybt.core.util.Debug

public class Debug extends Object
Debug-assisting class.
  • Field Details

    • STOP_AT_INITIALIZER

      private static final boolean STOP_AT_INITIALIZER
    • diag_logger

      private static final AEDiagnosticsLogger diag_logger
  • Constructor Details

    • Debug

      public Debug()
  • Method Details

    • out

      public static void out(String _debug_message)
      Prints out the given debug message to System.out, prefixed by the calling class name, method and line number.
    • out

      public static void out(Throwable _exception)
      Prints out the given exception stacktrace to System.out, prefixed by the calling class name, method and line number.
    • outNoStack

      public static void outNoStack(String str)
    • outNoStack

      public static void outNoStack(String str, boolean stderr)
    • outDiagLoggerOnly

      public static void outDiagLoggerOnly(String str)
    • out

      public static void out(String _debug_msg, Throwable _exception)
      Prints out the given debug message to System.out, prefixed by the calling class name, method and line number, appending the stacktrace of the given exception.
    • getLastCaller

      public static String getLastCaller()
    • getLastCaller

      public static String getLastCaller(int numToGoBackFurther)
    • getLastCallerShort

      public static String getLastCallerShort()
    • getLastCallerShort

      public static String getLastCallerShort(int numToGoBackFurther)
    • outStackTrace

      public static void outStackTrace()
    • getStackTrace

      private static String getStackTrace(int endNumToSkip)
    • killAWTThreads

      public static void killAWTThreads()
    • getCompressedStackTrace

      private static String getCompressedStackTrace(Throwable t, int frames_to_skip)
    • getCompressedStackTrace

      public static String getCompressedStackTrace(Throwable t, int frames_to_skip, int iMaxLines)
    • getCompressedStackTrace

      public static String getCompressedStackTrace(Throwable t, int frames_to_skip, int iMaxLines, boolean showErrString)
    • getStackTrace

      public static String getStackTrace(boolean bCompressed, boolean bIncludeSelf)
    • getStackTrace

      public static String getStackTrace(boolean bCompressed, boolean bIncludeSelf, int iNumLinesToSkip, int iMaxLines)
    • getCompressedStackTrace

      private static String getCompressedStackTrace(int frames_to_skip, int iMaxLines)
    • killAWTThreads

      public static void killAWTThreads(ThreadGroup threadGroup)
    • dumpThreads

      public static void dumpThreads(String name)
    • dumpThreads

      public static void dumpThreads(ThreadGroup threadGroup, String indent)
    • dumpThreadsLoop

      public static void dumpThreadsLoop(String name)
    • dumpSystemProperties

      public static void dumpSystemProperties()
    • getNestedExceptionMessage

      public static String getNestedExceptionMessage(Throwable e)
    • containsException

      public static boolean containsException(Throwable error, Class<? extends Throwable> cla)
    • getNestedExceptionMessageAndStack

      public static String getNestedExceptionMessageAndStack(Throwable e)
    • getCompressedStackTraceSkipFrames

      public static String getCompressedStackTraceSkipFrames(int frames_to_skip)
    • getCompressedStackTrace

      public static String getCompressedStackTrace()
    • getCompressedStackTrace

      public static String getCompressedStackTrace(int iMaxLines)
      Parameters:
      iMaxLines - Max # of stack lines. If < 0, chops off -MaxLines entries from end
      Returns:
    • getExceptionMessage

      public static String getExceptionMessage(Throwable e)
    • printStackTrace

      public static void printStackTrace(Throwable e)
    • printStackTrace

      public static void printStackTrace(Throwable e, Object context)
    • getStackTrace

      public static String getStackTrace(Throwable e)
    • diagLoggerLog

      private static void diagLoggerLog(String str)
    • diagLoggerLogAndOut

      private static void diagLoggerLogAndOut(String str, boolean stderr)
    • diagLoggerLogAndOut

      private static void diagLoggerLogAndOut(Throwable e)
    • writeEmergencyLog

      private static void writeEmergencyLog(String str)
    • secretFileName

      public static String secretFileName(String key)
      Parameters:
      key -
      Returns:
    • main

      public static void main(String[] args)