Reland "Remove WEBRTC_TRACE."

This is a reland of 2209b90449473e1df3e0797b6271c7624b41907d
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}

Bug: webrtc:5118
Change-Id: I2d93fd40fcaa251c363bdcfb1c04b834a3a7f0e9
Reviewed-on: https://webrtc-review.googlesource.com/6000
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20132}
This commit is contained in:
Fredrik Solenberg
2017-10-04 09:53:35 +02:00
committed by Commit Bot
parent 98ea2dac8a
commit 68007e97ec
36 changed files with 15 additions and 1589 deletions

View File

@ -22,7 +22,6 @@ import java.util.logging.Logger;
* app:
* - Logging.enableLogThreads
* - Logging.enableLogTimeStamps
* - Logging.enableTracing
* - Logging.enableLogToDebugOutput
*
* Using these APIs requires that the native library is loaded. For example:
@ -34,7 +33,6 @@ import java.util.logging.Logger;
*/
public class Logging {
private static final Logger fallbackLogger = createFallbackLogger();
private static volatile boolean tracingEnabled;
private static volatile boolean loggingEnabled;
private static Logger createFallbackLogger() {
@ -43,7 +41,8 @@ public class Logging {
return fallbackLogger;
}
// Keep in sync with webrtc/common_types.h:TraceLevel.
// TODO(solenberg): Remove once dependent projects updated.
@Deprecated
public enum TraceLevel {
TRACE_NONE(0x0000),
TRACE_STATEINFO(0x0001),
@ -78,19 +77,9 @@ public class Logging {
nativeEnableLogTimeStamps();
}
// 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;
// TODO(solenberg): Remove once dependent projects updated.
@Deprecated
public static void enableTracing(String path, EnumSet<TraceLevel> levels) {
}
// Enable diagnostic logging for messages of |severity| to the platform debug
@ -165,7 +154,6 @@ 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();