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
Modifier and TypeClassDescriptionstatic enum
static enum
Deprecated. -
Field Summary
Modifier and TypeFieldDescriptionprivate static final Logger
private static Loggable
private static Logging.Severity
private static boolean
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static Logger
static void
(package private) static void
static void
static void
static void
static void
static void
enableLogToDebugOutput
(Logging.Severity severity) static void
enableTracing
(String path, EnumSet<Logging.TraceLevel> levels) Deprecated.private static String
(package private) static void
injectLoggable
(Loggable injectedLoggable, Logging.Severity severity) static void
log
(Logging.Severity severity, String tag, String message) private static void
private static void
private static void
nativeEnableLogToDebugOutput
(int nativeSeverity) private static void
static void
static void
static 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
-