Class ExtractorLogger
- java.lang.Object
-
- org.schabi.newpipe.extractor.utils.ExtractorLogger
-
public final class ExtractorLogger extends java.lang.ObjectLogging class for outputting logs from the extractor to the desired output
Intended to be used in the same manner as Android'sLog:
ExtractorLogger.d("Hello my name Jeff")
Also supports formatted arguments:
ExtractorLogger.d("Hello my name is {Name} {}", name, surname)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classExtractorLogger.ConsoleLoggerstatic classExtractorLogger.Level
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidd(java.lang.String tag, java.lang.String msg)static voidd(java.lang.String tag, java.lang.String template, java.lang.Object... args)static voidd(java.lang.String tag, java.lang.String msg, java.lang.Throwable t)static voidd(java.lang.String tag, java.lang.Throwable t, java.lang.String template, java.lang.Object... args)static voide(java.lang.String tag, java.lang.String msg)static voide(java.lang.String tag, java.lang.String template, java.lang.Object... args)static voide(java.lang.String tag, java.lang.String msg, java.lang.Throwable t)static voide(java.lang.String tag, java.lang.Throwable t, java.lang.String template, java.lang.Object... args)static voidsetLogger(Logger customLogger)Set the Logger that you want the extractor logs to be logged to
Provide an implementation of theLoggerinterface for each method and whenever the extractor code callsExtractorLogger.d/w/eit will be routed through tocustomLogger
For NewPipe, this should be set at the start of the application ideally inMainActivity.onCreate, but absolutely before any extractor code can runstatic voidw(java.lang.String tag, java.lang.String msg)static voidw(java.lang.String tag, java.lang.String template, java.lang.Object... args)static voidw(java.lang.String tag, java.lang.String msg, java.lang.Throwable t)static voidw(java.lang.String tag, java.lang.Throwable t, java.lang.String template, java.lang.Object... args)
-
-
-
Method Detail
-
setLogger
public static void setLogger(Logger customLogger)
Set the Logger that you want the extractor logs to be logged to
Provide an implementation of theLoggerinterface for each method and whenever the extractor code callsExtractorLogger.d/w/eit will be routed through tocustomLogger
For NewPipe, this should be set at the start of the application ideally inMainActivity.onCreate, but absolutely before any extractor code can run
-
d
public static void d(java.lang.String tag, java.lang.String msg)
-
d
public static void d(java.lang.String tag, java.lang.String msg, java.lang.Throwable t)
-
d
public static void d(java.lang.String tag, java.lang.String template, java.lang.Object... args)
-
d
public static void d(java.lang.String tag, java.lang.Throwable t, java.lang.String template, java.lang.Object... args)
-
w
public static void w(java.lang.String tag, java.lang.String msg)
-
w
public static void w(java.lang.String tag, java.lang.String msg, java.lang.Throwable t)
-
w
public static void w(java.lang.String tag, java.lang.String template, java.lang.Object... args)
-
w
public static void w(java.lang.String tag, java.lang.Throwable t, java.lang.String template, java.lang.Object... args)
-
e
public static void e(java.lang.String tag, java.lang.String msg)
-
e
public static void e(java.lang.String tag, java.lang.String msg, java.lang.Throwable t)
-
e
public static void e(java.lang.String tag, java.lang.String template, java.lang.Object... args)
-
e
public static void e(java.lang.String tag, java.lang.Throwable t, java.lang.String template, java.lang.Object... args)
-
-