Class ExtractorLogger

java.lang.Object
org.schabi.newpipe.extractor.utils.ExtractorLogger

public final class ExtractorLogger extends Object
Logging class for outputting logs from the extractor to the desired output

Intended to be used in the same manner as Android's Log:
ExtractorLogger.d("Hello my name Jeff")

Also supports formatted arguments:
ExtractorLogger.d("Hello my name is {Name} {}", name, surname)
  • Method Details

    • setLogger

      public static void setLogger(Logger customLogger)
      Set the Logger that you want the extractor logs to be logged to
      Provide an implementation of the Logger interface for each method and whenever the extractor code calls ExtractorLogger.d/w/e it will be routed through to customLogger

      For NewPipe, this should be set at the start of the application ideally in MainActivity.onCreate, but absolutely before any extractor code can run
    • d

      public static void d(String tag, String msg)
    • d

      public static void d(String tag, String msg, Throwable t)
    • d

      public static void d(String tag, String template, Object... args)
    • d

      public static void d(String tag, Throwable t, String template, Object... args)
    • w

      public static void w(String tag, String msg)
    • w

      public static void w(String tag, String msg, Throwable t)
    • w

      public static void w(String tag, String template, Object... args)
    • w

      public static void w(String tag, Throwable t, String template, Object... args)
    • e

      public static void e(String tag, String msg)
    • e

      public static void e(String tag, String msg, Throwable t)
    • e

      public static void e(String tag, String template, Object... args)
    • e

      public static void e(String tag, Throwable t, String template, Object... args)