Package org.webrtc
Class Logging
java.lang.Object
org.webrtc.Logging
Java wrapper for WebRTC logging. Logging defaults to java.util.logging.Logger, but a custom
logger implementing the Loggable interface can be injected along with a Severity. All subsequent
log messages will then be redirected to the injected Loggable, except those with a severity lower
than the specified severity, which will be discarded.
It is also possible to switch to native logging (rtc::LogMessage) if one of the following static
functions are called from the app:
- Logging.enableLogThreads
- Logging.enableLogTimeStamps
- Logging.enableLogToDebugOutput
The priority goes:
1. Injected loggable
2. Native logging
3. Fallback logging.
Only one method will be used at a time.
Injecting a Loggable or using any of the enable... methods requires that the native library is
loaded, using PeerConnectionFactory.initialize.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enumDeprecated. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Loggerprivate static Loggableprivate static Logging.Severityprivate static boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Loggerstatic void(package private) static voidstatic voidstatic voidstatic voidstatic voidstatic voidenableLogToDebugOutput(Logging.Severity severity) static voidenableTracing(String path, EnumSet<Logging.TraceLevel> levels) Deprecated.private static String(package private) static voidinjectLoggable(Loggable injectedLoggable, Logging.Severity severity) static voidlog(Logging.Severity severity, String tag, String message) private static voidprivate static voidprivate static voidnativeEnableLogToDebugOutput(int nativeSeverity) private static voidstatic voidstatic voidstatic void
-
Field Details
-
fallbackLogger
-
loggingEnabled
private static volatile boolean loggingEnabled -
loggable
-
loggableSeverity
-
-
Constructor Details
-
Logging
public Logging()
-
-
Method Details
-
createFallbackLogger
-
injectLoggable
-
deleteInjectedLoggable
static void deleteInjectedLoggable() -
enableLogThreads
public static void enableLogThreads() -
enableLogTimeStamps
public static void enableLogTimeStamps() -
enableTracing
Deprecated. -
enableLogToDebugOutput
-
log
-
d
-
e
-
w
-
e
-
w
-
v
-
getStackTraceString
-
nativeEnableLogToDebugOutput
private static void nativeEnableLogToDebugOutput(int nativeSeverity) -
nativeEnableLogThreads
private static void nativeEnableLogThreads() -
nativeEnableLogTimeStamps
private static void nativeEnableLogTimeStamps() -
nativeLog
-