Revert "Remove WEBRTC_TRACE."
This reverts commit 2209b90449473e1df3e0797b6271c7624b41907d. Reason for revert: breaks Chromium Original change's description: > Remove WEBRTC_TRACE. > > Bug: webrtc:5118 > Change-Id: I0af0f8845ee016fa61d7cecc526e2a672ec8732d > Reviewed-on: https://webrtc-review.googlesource.com/5382 > Reviewed-by: Niels Moller <nisse@webrtc.org> > Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> > Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#20114} TBR=solenberg@webrtc.org,sakal@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org Change-Id: Ie54fc05c1d7895c088cba410ed87a7c9a0701427 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: webrtc:5118 Reviewed-on: https://webrtc-review.googlesource.com/5980 Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org> Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20115}
This commit is contained in:

committed by
Commit Bot

parent
2209b90449
commit
729b9109ca
@ -22,11 +22,13 @@ import java.util.logging.Logger;
|
||||
* app:
|
||||
* - Logging.enableLogThreads
|
||||
* - Logging.enableLogTimeStamps
|
||||
* - Logging.enableTracing
|
||||
* - Logging.enableLogToDebugOutput
|
||||
* Using native logging requires the presence of the jingle_peerconnection_so library.
|
||||
*/
|
||||
public class Logging {
|
||||
private static final Logger fallbackLogger = createFallbackLogger();
|
||||
private static volatile boolean tracingEnabled;
|
||||
private static volatile boolean loggingEnabled;
|
||||
|
||||
private static Logger createFallbackLogger() {
|
||||
@ -35,8 +37,7 @@ public class Logging {
|
||||
return fallbackLogger;
|
||||
}
|
||||
|
||||
// TODO(solenberg): Remove once dependent projects updated.
|
||||
@Deprecated
|
||||
// Keep in sync with webrtc/common_types.h:TraceLevel.
|
||||
public enum TraceLevel {
|
||||
TRACE_NONE(0x0000),
|
||||
TRACE_STATEINFO(0x0001),
|
||||
@ -71,9 +72,19 @@ public class Logging {
|
||||
nativeEnableLogTimeStamps();
|
||||
}
|
||||
|
||||
// TODO(solenberg): Remove once dependent projects updated.
|
||||
@Deprecated
|
||||
public static void enableTracing(String path, EnumSet<TraceLevel> levels) {
|
||||
// Enable tracing to |path| of messages of |levels|.
|
||||
// On Android, use "logcat:" for |path| to send output there.
|
||||
// Note: this function controls the output of the WEBRTC_TRACE() macros.
|
||||
public static synchronized void enableTracing(String path, EnumSet<TraceLevel> levels) {
|
||||
if (tracingEnabled) {
|
||||
return;
|
||||
}
|
||||
int nativeLevel = 0;
|
||||
for (TraceLevel level : levels) {
|
||||
nativeLevel |= level.level;
|
||||
}
|
||||
nativeEnableTracing(path, nativeLevel);
|
||||
tracingEnabled = true;
|
||||
}
|
||||
|
||||
// Enable diagnostic logging for messages of |severity| to the platform debug
|
||||
@ -148,6 +159,7 @@ public class Logging {
|
||||
return sw.toString();
|
||||
}
|
||||
|
||||
private static native void nativeEnableTracing(String path, int nativeLevels);
|
||||
private static native void nativeEnableLogToDebugOutput(int nativeSeverity);
|
||||
private static native void nativeEnableLogThreads();
|
||||
private static native void nativeEnableLogTimeStamps();
|
||||
|
Reference in New Issue
Block a user