Moved RtcEventLog files from call/ to logging/

The RtcEventLog headers need to be accessible from any place which needs
logging, and the implementation needs access to data structures that are
logged.

After a discussion in the code review, we all agreed to move the RtcEventLog implementation into its own top level directory - which I called "logging/" in expectation that other types of logging may have similar requirements. The directory contains two main build targets - "rtc_event_log_api", which is just rtc_event_log.h, that has no external dependencies and can be used from anywhere, and "rtc_event_log_impl" which contains the rest of the implementation and has many dependencies (more in the future).

The "api" target can be referenced from anywhere, while the "impl" target is only needed at the place of instantiation (currently Call, soon to be moved to PeerConnection by https://codereview.webrtc.org/2353033005/).

This change allows using RtcEventLog in the p2p/ directory, so that we
can log STUN pings and ICE state transitions.

BUG=webrtc:6393
R=kjellander@webrtc.org, kwiberg@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, terelius@webrtc.org

Review URL: https://codereview.webrtc.org/2380683005 .

Cr-Commit-Position: refs/heads/master@{#14485}
diff --git a/webrtc/BUILD.gn b/webrtc/BUILD.gn
index aaea4e3..a97d508 100644
--- a/webrtc/BUILD.gn
+++ b/webrtc/BUILD.gn
@@ -283,7 +283,7 @@
 
     if (rtc_enable_protobuf) {
       defines += [ "ENABLE_RTC_EVENT_LOG" ]
-      deps += [ ":rtc_event_log_proto" ]
+      deps += [ "logging:rtc_event_log_proto" ]
     }
   }
 }
@@ -305,35 +305,6 @@
   }
 }
 
-if (rtc_enable_protobuf) {
-  proto_library("rtc_event_log_proto") {
-    sources = [
-      "call/rtc_event_log.proto",
-    ]
-    proto_out_dir = "webrtc/call"
-  }
-}
-
-if (rtc_enable_protobuf) {
-  rtc_static_library("rtc_event_log_parser") {
-    sources = [
-      "call/rtc_event_log_parser.cc",
-      "call/rtc_event_log_parser.h",
-    ]
-
-    public_deps = [
-      ":rtc_event_log_proto",
-      ":webrtc_common",
-    ]
-
-    if (is_clang && !is_nacl) {
-      # Suppress warnings from Chrome's Clang plugins.
-      # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
-      suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
-    }
-  }
-}
-
 if (use_libfuzzer || use_drfuzz || use_afl) {
   # This target is only here for gn to discover fuzzer build targets under
   # webrtc/test/fuzzers/.
@@ -529,7 +500,7 @@
     ]
 
     if (rtc_enable_protobuf) {
-      deps += [ "call:rtc_event_log_tests" ]
+      deps += [ "logging:rtc_event_log_tests" ]
     }
 
     if (is_android) {
diff --git a/webrtc/audio/webrtc_audio.gypi b/webrtc/audio/webrtc_audio.gypi
index 6230057..4439d1f 100644
--- a/webrtc/audio/webrtc_audio.gypi
+++ b/webrtc/audio/webrtc_audio.gypi
@@ -12,7 +12,7 @@
       '<(webrtc_root)/common.gyp:webrtc_common',
       '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
       '<(webrtc_root)/voice_engine/voice_engine.gyp:voice_engine',
-      '<(webrtc_root)/webrtc.gyp:rtc_event_log',
+      '<(webrtc_root)/webrtc.gyp:rtc_event_log_api',
     ],
     'webrtc_audio_sources': [
       'audio/audio_receive_stream.cc',
diff --git a/webrtc/call/BUILD.gn b/webrtc/call/BUILD.gn
index 648bc85..bd2b30e 100644
--- a/webrtc/call/BUILD.gn
+++ b/webrtc/call/BUILD.gn
@@ -23,11 +23,11 @@
   }
 
   deps = [
-    ":rtc_event_log",
     "..:webrtc_common",
     "../api:call_api",
     "../audio",
     "../base:rtc_task_queue",
+    "../logging:rtc_event_log_impl",
     "../modules/congestion_controller",
     "../modules/rtp_rtcp",
     "../system_wrappers",
@@ -35,32 +35,6 @@
   ]
 }
 
-rtc_static_library("rtc_event_log") {
-  sources = [
-    "rtc_event_log.cc",
-    "rtc_event_log.h",
-    "rtc_event_log_helper_thread.cc",
-    "rtc_event_log_helper_thread.h",
-  ]
-
-  defines = []
-
-  deps = [
-    "..:webrtc_common",
-    "../modules/rtp_rtcp",
-  ]
-
-  if (rtc_enable_protobuf) {
-    defines += [ "ENABLE_RTC_EVENT_LOG" ]
-    deps += [ "..:rtc_event_log_proto" ]
-  }
-  if (is_clang && !is_nacl) {
-    # Suppress warnings from Chrome's Clang plugins.
-    # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
-    suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
-  }
-}
-
 if (rtc_include_tests) {
   rtc_source_set("call_tests") {
     testonly = true
@@ -69,7 +43,6 @@
       "bitrate_estimator_tests.cc",
       "call_unittest.cc",
       "packet_injection_tests.cc",
-      "ringbuffer_unittest.cc",
     ]
     deps = [
       ":call",
@@ -82,24 +55,4 @@
       suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
     }
   }
-  rtc_source_set("rtc_event_log_tests") {
-    testonly = true
-    sources = [
-      "rtc_event_log_unittest.cc",
-      "rtc_event_log_unittest_helper.cc",
-    ]
-    deps = [
-      ":rtc_event_log",
-      "..:rtc_event_log_parser",
-      "../modules/rtp_rtcp",
-      "../system_wrappers:metrics_default",
-      "//testing/gmock",
-      "//testing/gtest",
-    ]
-    if (is_clang) {
-      # Suppress warnings from the Chromium Clang plugin.
-      # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
-      suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
-    }
-  }
 }
diff --git a/webrtc/call/DEPS b/webrtc/call/DEPS
index 0f90308..4256b58 100644
--- a/webrtc/call/DEPS
+++ b/webrtc/call/DEPS
@@ -1,6 +1,7 @@
 include_rules = [
   "+webrtc/audio",
   "+webrtc/base",
+  "+webrtc/logging/rtc_event_log",
   "+webrtc/modules/audio_coding",
   "+webrtc/modules/bitrate_controller",
   "+webrtc/modules/congestion_controller",
diff --git a/webrtc/call/call.cc b/webrtc/call/call.cc
index 16a6f46..dd08d77 100644
--- a/webrtc/call/call.cc
+++ b/webrtc/call/call.cc
@@ -27,8 +27,8 @@
 #include "webrtc/base/trace_event.h"
 #include "webrtc/call.h"
 #include "webrtc/call/bitrate_allocator.h"
-#include "webrtc/call/rtc_event_log.h"
 #include "webrtc/config.h"
+#include "webrtc/logging/rtc_event_log/rtc_event_log.h"
 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h"
 #include "webrtc/modules/congestion_controller/include/congestion_controller.h"
 #include "webrtc/modules/pacing/paced_sender.h"
diff --git a/webrtc/call/mock/mock_rtc_event_log.h b/webrtc/call/mock/mock_rtc_event_log.h
index bb1337e..2762386 100644
--- a/webrtc/call/mock/mock_rtc_event_log.h
+++ b/webrtc/call/mock/mock_rtc_event_log.h
@@ -13,7 +13,7 @@
 
 #include <string>
 
-#include "webrtc/call/rtc_event_log.h"
+#include "webrtc/logging/rtc_event_log/rtc_event_log.h"
 #include "webrtc/test/gmock.h"
 
 namespace webrtc {
diff --git a/webrtc/call/webrtc_call.gypi b/webrtc/call/webrtc_call.gypi
index 455a11a..59dcef6 100644
--- a/webrtc/call/webrtc_call.gypi
+++ b/webrtc/call/webrtc_call.gypi
@@ -12,7 +12,7 @@
       '<(webrtc_root)/modules/modules.gyp:congestion_controller',
       '<(webrtc_root)/modules/modules.gyp:rtp_rtcp',
       '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
-      '<(webrtc_root)/webrtc.gyp:rtc_event_log',
+      '<(webrtc_root)/webrtc.gyp:rtc_event_log_impl',
     ],
     'webrtc_call_sources': [
       'call/bitrate_allocator.cc',
diff --git a/webrtc/logging/BUILD.gn b/webrtc/logging/BUILD.gn
new file mode 100644
index 0000000..7078963
--- /dev/null
+++ b/webrtc/logging/BUILD.gn
@@ -0,0 +1,100 @@
+# Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS.  All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+import("../build/webrtc.gni")
+import("//third_party/protobuf/proto_library.gni")
+if (is_android) {
+  import("//build/config/android/config.gni")
+  import("//build/config/android/rules.gni")
+}
+
+rtc_source_set("rtc_event_log_api") {
+  sources = [
+    "rtc_event_log/rtc_event_log.h",
+  ]
+}
+
+rtc_static_library("rtc_event_log_impl") {
+  sources = [
+    "rtc_event_log/ringbuffer.h",
+    "rtc_event_log/rtc_event_log.cc",
+    "rtc_event_log/rtc_event_log_helper_thread.cc",
+    "rtc_event_log/rtc_event_log_helper_thread.h",
+  ]
+
+  defines = []
+
+  deps = [
+    ":rtc_event_log_api",
+    "..:webrtc_common",
+    "../modules/rtp_rtcp",
+  ]
+
+  if (rtc_enable_protobuf) {
+    defines += [ "ENABLE_RTC_EVENT_LOG" ]
+    deps += [ ":rtc_event_log_proto" ]
+  }
+  if (is_clang && !is_nacl) {
+    # Suppress warnings from Chrome's Clang plugins.
+    # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+    suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
+  }
+}
+
+if (rtc_include_tests) {
+  rtc_source_set("rtc_event_log_tests") {
+    testonly = true
+    sources = [
+      "rtc_event_log/ringbuffer_unittest.cc",
+      "rtc_event_log/rtc_event_log_unittest.cc",
+      "rtc_event_log/rtc_event_log_unittest_helper.cc",
+    ]
+    deps = [
+      ":rtc_event_log_impl",
+      ":rtc_event_log_parser",
+      "../modules/rtp_rtcp",
+      "../system_wrappers:metrics_default",
+      "//testing/gmock",
+      "//testing/gtest",
+    ]
+    if (is_clang) {
+      # Suppress warnings from the Chromium Clang plugin.
+      # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+      suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
+    }
+  }
+}
+
+if (rtc_enable_protobuf) {
+  proto_library("rtc_event_log_proto") {
+    sources = [
+      "rtc_event_log/rtc_event_log.proto",
+    ]
+    proto_out_dir = "webrtc/logging/rtc_event_log"
+  }
+}
+
+if (rtc_enable_protobuf) {
+  rtc_static_library("rtc_event_log_parser") {
+    sources = [
+      "rtc_event_log/rtc_event_log_parser.cc",
+      "rtc_event_log/rtc_event_log_parser.h",
+    ]
+
+    public_deps = [
+      ":rtc_event_log_proto",
+      "..:webrtc_common",
+    ]
+
+    if (is_clang && !is_nacl) {
+      # Suppress warnings from Chrome's Clang plugins.
+      # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+      suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
+    }
+  }
+}
diff --git a/webrtc/logging/OWNERS b/webrtc/logging/OWNERS
new file mode 100644
index 0000000..492fb7a
--- /dev/null
+++ b/webrtc/logging/OWNERS
@@ -0,0 +1,3 @@
+skvlad@webrtc.org
+stefan@webrtc.org
+terelius@webrtc.org
diff --git a/webrtc/logging/rtc_event_log/DEPS b/webrtc/logging/rtc_event_log/DEPS
new file mode 100644
index 0000000..039ebf9
--- /dev/null
+++ b/webrtc/logging/rtc_event_log/DEPS
@@ -0,0 +1,5 @@
+include_rules = [
+  "+webrtc/base",
+  "+webrtc/modules/rtp_rtcp",
+  "+webrtc/system_wrappers",
+]
diff --git a/webrtc/call/ringbuffer.h b/webrtc/logging/rtc_event_log/ringbuffer.h
similarity index 93%
rename from webrtc/call/ringbuffer.h
rename to webrtc/logging/rtc_event_log/ringbuffer.h
index fa5e422..6c0ffda 100644
--- a/webrtc/call/ringbuffer.h
+++ b/webrtc/logging/rtc_event_log/ringbuffer.h
@@ -9,8 +9,8 @@
  *
  */
 
-#ifndef WEBRTC_CALL_RINGBUFFER_H_
-#define WEBRTC_CALL_RINGBUFFER_H_
+#ifndef WEBRTC_LOGGING_RTC_EVENT_LOG_RINGBUFFER_H_
+#define WEBRTC_LOGGING_RTC_EVENT_LOG_RINGBUFFER_H_
 
 #include <memory>
 #include <utility>
@@ -97,4 +97,4 @@
 
 }  // namespace webrtc
 
-#endif  // WEBRTC_CALL_RINGBUFFER_H_
+#endif  // WEBRTC_LOGGING_RTC_EVENT_LOG_RINGBUFFER_H_
diff --git a/webrtc/call/ringbuffer_unittest.cc b/webrtc/logging/rtc_event_log/ringbuffer_unittest.cc
similarity index 98%
rename from webrtc/call/ringbuffer_unittest.cc
rename to webrtc/logging/rtc_event_log/ringbuffer_unittest.cc
index 370f262..7e672fe 100644
--- a/webrtc/call/ringbuffer_unittest.cc
+++ b/webrtc/logging/rtc_event_log/ringbuffer_unittest.cc
@@ -12,7 +12,7 @@
 #include <list>
 
 #include "webrtc/base/random.h"
-#include "webrtc/call/ringbuffer.h"
+#include "webrtc/logging/rtc_event_log/ringbuffer.h"
 #include "webrtc/test/gtest.h"
 
 namespace {
diff --git a/webrtc/call/rtc_event_log.cc b/webrtc/logging/rtc_event_log/rtc_event_log.cc
similarity index 97%
rename from webrtc/call/rtc_event_log.cc
rename to webrtc/logging/rtc_event_log/rtc_event_log.cc
index c022296..ff31cee 100644
--- a/webrtc/call/rtc_event_log.cc
+++ b/webrtc/logging/rtc_event_log/rtc_event_log.cc
@@ -8,7 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "webrtc/call/rtc_event_log.h"
+#include "webrtc/logging/rtc_event_log/rtc_event_log.h"
 
 #include <limits>
 #include <vector>
@@ -19,7 +19,7 @@
 #include "webrtc/base/swap_queue.h"
 #include "webrtc/base/thread_checker.h"
 #include "webrtc/call.h"
-#include "webrtc/call/rtc_event_log_helper_thread.h"
+#include "webrtc/logging/rtc_event_log/rtc_event_log_helper_thread.h"
 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
 #include "webrtc/modules/rtp_rtcp/source/byte_io.h"
 #include "webrtc/modules/rtp_rtcp/source/rtcp_utility.h"
@@ -30,9 +30,9 @@
 #ifdef ENABLE_RTC_EVENT_LOG
 // Files generated at build-time by the protobuf compiler.
 #ifdef WEBRTC_ANDROID_PLATFORM_BUILD
-#include "external/webrtc/webrtc/call/rtc_event_log.pb.h"
+#include "external/webrtc/webrtc/logging/rtc_event_log/rtc_event_log.pb.h"
 #else
-#include "webrtc/call/rtc_event_log.pb.h"
+#include "webrtc/logging/rtc_event_log/rtc_event_log.pb.h"
 #endif
 #endif
 
@@ -129,9 +129,7 @@
     : message_queue_(kControlMessagesPerSecond),
       event_queue_(kEventsPerSecond),
       clock_(clock),
-      helper_thread_(&message_queue_,
-                     &event_queue_,
-                     clock),
+      helper_thread_(&message_queue_, &event_queue_, clock),
       thread_checker_() {
   thread_checker_.DetachFromThread();
 }
diff --git a/webrtc/call/rtc_event_log.h b/webrtc/logging/rtc_event_log/rtc_event_log.h
similarity index 96%
rename from webrtc/call/rtc_event_log.h
rename to webrtc/logging/rtc_event_log/rtc_event_log.h
index a335969..910e9a6 100644
--- a/webrtc/call/rtc_event_log.h
+++ b/webrtc/logging/rtc_event_log/rtc_event_log.h
@@ -8,8 +8,8 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef WEBRTC_CALL_RTC_EVENT_LOG_H_
-#define WEBRTC_CALL_RTC_EVENT_LOG_H_
+#ifndef WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_H_
+#define WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_H_
 
 #include <memory>
 #include <string>
@@ -139,4 +139,4 @@
 
 }  // namespace webrtc
 
-#endif  // WEBRTC_CALL_RTC_EVENT_LOG_H_
+#endif  // WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_H_
diff --git a/webrtc/call/rtc_event_log.proto b/webrtc/logging/rtc_event_log/rtc_event_log.proto
similarity index 99%
rename from webrtc/call/rtc_event_log.proto
rename to webrtc/logging/rtc_event_log/rtc_event_log.proto
index b14306e..a6d1695 100644
--- a/webrtc/call/rtc_event_log.proto
+++ b/webrtc/logging/rtc_event_log/rtc_event_log.proto
@@ -2,7 +2,6 @@
 option optimize_for = LITE_RUNTIME;
 package webrtc.rtclog;
 
-
 enum MediaType {
   ANY = 0;
   AUDIO = 1;
@@ -10,7 +9,6 @@
   DATA = 3;
 }
 
-
 // This is the main message to dump to a file, it can contain multiple event
 // messages, but it is possible to append multiple EventStreams (each with a
 // single event) to a file.
@@ -19,7 +17,6 @@
   repeated Event stream = 1;
 }
 
-
 message Event {
   // required - Elapsed wallclock time in us since the start of the log.
   optional int64 timestamp_us = 1;
@@ -70,7 +67,6 @@
   optional AudioSendConfig audio_sender_config = 11;
 }
 
-
 message RtpPacket {
   // required - True if the packet is incoming w.r.t. the user logging the data
   optional bool incoming = 1;
@@ -87,7 +83,6 @@
   // Do not add code to log user payload data without a privacy review!
 }
 
-
 message RtcpPacket {
   // required - True if the packet is incoming w.r.t. the user logging the data
   optional bool incoming = 1;
@@ -150,7 +145,6 @@
   repeated DecoderConfig decoders = 7;
 }
 
-
 // Maps decoder names to payload types.
 message DecoderConfig {
   // required
@@ -160,7 +154,6 @@
   optional int32 payload_type = 2;
 }
 
-
 // Maps RTP header extension names to numerical IDs.
 message RtpHeaderExtension {
   // required
@@ -170,7 +163,6 @@
   optional int32 id = 2;
 }
 
-
 // RTX settings for incoming video payloads that may be received.
 // RTX is disabled if there's no config present.
 message RtxConfig {
@@ -181,7 +173,6 @@
   optional int32 rtx_payload_type = 2;
 }
 
-
 message RtxMap {
   // required
   optional int32 payload_type = 1;
@@ -190,7 +181,6 @@
   optional RtxConfig config = 2;
 }
 
-
 message VideoSendConfig {
   // Synchronization source (stream identifier) for outgoing stream.
   // One stream can have several ssrcs for e.g. simulcast.
@@ -210,7 +200,6 @@
   optional EncoderConfig encoder = 5;
 }
 
-
 // Maps encoder names to payload types.
 message EncoderConfig {
   // required
@@ -220,7 +209,6 @@
   optional int32 payload_type = 2;
 }
 
-
 message AudioReceiveConfig {
   // required - Synchronization source (stream identifier) to be received.
   optional uint32 remote_ssrc = 1;
@@ -232,7 +220,6 @@
   repeated RtpHeaderExtension header_extensions = 3;
 }
 
-
 message AudioSendConfig {
   // required - Synchronization source (stream identifier) for outgoing stream.
   optional uint32 ssrc = 1;
diff --git a/webrtc/call/rtc_event_log2rtp_dump.cc b/webrtc/logging/rtc_event_log/rtc_event_log2rtp_dump.cc
similarity index 97%
rename from webrtc/call/rtc_event_log2rtp_dump.cc
rename to webrtc/logging/rtc_event_log/rtc_event_log2rtp_dump.cc
index 5733cfa..337b65b 100644
--- a/webrtc/call/rtc_event_log2rtp_dump.cc
+++ b/webrtc/logging/rtc_event_log/rtc_event_log2rtp_dump.cc
@@ -16,8 +16,8 @@
 #include "gflags/gflags.h"
 #include "webrtc/base/checks.h"
 #include "webrtc/call.h"
-#include "webrtc/call/rtc_event_log.h"
-#include "webrtc/call/rtc_event_log_parser.h"
+#include "webrtc/logging/rtc_event_log/rtc_event_log.h"
+#include "webrtc/logging/rtc_event_log/rtc_event_log_parser.h"
 #include "webrtc/modules/rtp_rtcp/source/byte_io.h"
 #include "webrtc/test/rtp_file_writer.h"
 
diff --git a/webrtc/call/rtc_event_log_helper_thread.cc b/webrtc/logging/rtc_event_log/rtc_event_log_helper_thread.cc
similarity index 98%
rename from webrtc/call/rtc_event_log_helper_thread.cc
rename to webrtc/logging/rtc_event_log/rtc_event_log_helper_thread.cc
index c0f8972..4d55da3 100644
--- a/webrtc/call/rtc_event_log_helper_thread.cc
+++ b/webrtc/logging/rtc_event_log/rtc_event_log_helper_thread.cc
@@ -8,7 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "webrtc/call/rtc_event_log_helper_thread.h"
+#include "webrtc/logging/rtc_event_log/rtc_event_log_helper_thread.h"
 
 #include <algorithm>
 
@@ -74,7 +74,7 @@
   }
   wake_from_hibernation_.Set();
   wake_periodically_.Set();  // Wake up the output thread.
-  thread_.Stop();   // Wait for the thread to terminate.
+  thread_.Stop();            // Wait for the thread to terminate.
 }
 
 void RtcEventLogHelperThread::WaitForFileFinished() {
diff --git a/webrtc/call/rtc_event_log_helper_thread.h b/webrtc/logging/rtc_event_log/rtc_event_log_helper_thread.h
similarity index 90%
rename from webrtc/call/rtc_event_log_helper_thread.h
rename to webrtc/logging/rtc_event_log/rtc_event_log_helper_thread.h
index 1408961..bda27f2 100644
--- a/webrtc/call/rtc_event_log_helper_thread.h
+++ b/webrtc/logging/rtc_event_log/rtc_event_log_helper_thread.h
@@ -8,8 +8,8 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef WEBRTC_CALL_RTC_EVENT_LOG_HELPER_THREAD_H_
-#define WEBRTC_CALL_RTC_EVENT_LOG_HELPER_THREAD_H_
+#ifndef WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_HELPER_THREAD_H_
+#define WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_HELPER_THREAD_H_
 
 #include <limits>
 #include <memory>
@@ -22,7 +22,7 @@
 #include "webrtc/base/ignore_wundef.h"
 #include "webrtc/base/platform_thread.h"
 #include "webrtc/base/swap_queue.h"
-#include "webrtc/call/ringbuffer.h"
+#include "webrtc/logging/rtc_event_log/ringbuffer.h"
 #include "webrtc/system_wrappers/include/clock.h"
 #include "webrtc/system_wrappers/include/file_wrapper.h"
 
@@ -30,9 +30,9 @@
 // Files generated at build-time by the protobuf compiler.
 RTC_PUSH_IGNORING_WUNDEF()
 #ifdef WEBRTC_ANDROID_PLATFORM_BUILD
-#include "external/webrtc/webrtc/call/rtc_event_log.pb.h"
+#include "external/webrtc/webrtc/logging/rtc_event_log/rtc_event_log.pb.h"
 #else
-#include "webrtc/call/rtc_event_log.pb.h"
+#include "webrtc/logging/rtc_event_log/rtc_event_log.pb.h"
 #endif
 RTC_POP_IGNORING_WUNDEF()
 #endif
@@ -129,4 +129,4 @@
 
 #endif  // ENABLE_RTC_EVENT_LOG
 
-#endif  // WEBRTC_CALL_RTC_EVENT_LOG_HELPER_THREAD_H_
+#endif  // WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_HELPER_THREAD_H_
diff --git a/webrtc/call/rtc_event_log_parser.cc b/webrtc/logging/rtc_event_log/rtc_event_log_parser.cc
similarity index 98%
rename from webrtc/call/rtc_event_log_parser.cc
rename to webrtc/logging/rtc_event_log/rtc_event_log_parser.cc
index a2f95d0..362d79e 100644
--- a/webrtc/call/rtc_event_log_parser.cc
+++ b/webrtc/logging/rtc_event_log/rtc_event_log_parser.cc
@@ -8,7 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "webrtc/call/rtc_event_log_parser.h"
+#include "webrtc/logging/rtc_event_log/rtc_event_log_parser.h"
 
 #include <string.h>
 
@@ -19,7 +19,7 @@
 #include "webrtc/base/checks.h"
 #include "webrtc/base/logging.h"
 #include "webrtc/call.h"
-#include "webrtc/call/rtc_event_log.h"
+#include "webrtc/logging/rtc_event_log/rtc_event_log.h"
 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
 #include "webrtc/system_wrappers/include/file_wrapper.h"
 
diff --git a/webrtc/call/rtc_event_log_parser.h b/webrtc/logging/rtc_event_log/rtc_event_log_parser.h
similarity index 91%
rename from webrtc/call/rtc_event_log_parser.h
rename to webrtc/logging/rtc_event_log/rtc_event_log_parser.h
index a50ec20..6a684cb 100644
--- a/webrtc/call/rtc_event_log_parser.h
+++ b/webrtc/logging/rtc_event_log/rtc_event_log_parser.h
@@ -7,23 +7,23 @@
  *  in the file PATENTS.  All contributing project authors may
  *  be found in the AUTHORS file in the root of the source tree.
  */
-#ifndef WEBRTC_CALL_RTC_EVENT_LOG_PARSER_H_
-#define WEBRTC_CALL_RTC_EVENT_LOG_PARSER_H_
+#ifndef WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_PARSER_H_
+#define WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_PARSER_H_
 
 #include <string>
 #include <vector>
 
 #include "webrtc/base/ignore_wundef.h"
-#include "webrtc/call/rtc_event_log.h"
+#include "webrtc/logging/rtc_event_log/rtc_event_log.h"
 #include "webrtc/video_receive_stream.h"
 #include "webrtc/video_send_stream.h"
 
 // Files generated at build-time by the protobuf compiler.
 RTC_PUSH_IGNORING_WUNDEF()
 #ifdef WEBRTC_ANDROID_PLATFORM_BUILD
-#include "external/webrtc/webrtc/call/rtc_event_log.pb.h"
+#include "external/webrtc/webrtc/logging/rtc_event_log/rtc_event_log.pb.h"
 #else
-#include "webrtc/call/rtc_event_log.pb.h"
+#include "webrtc/logging/rtc_event_log/rtc_event_log.pb.h"
 #endif
 RTC_POP_IGNORING_WUNDEF()
 
@@ -120,4 +120,4 @@
 
 }  // namespace webrtc
 
-#endif  // WEBRTC_CALL_RTC_EVENT_LOG_PARSER_H_
+#endif  // WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_PARSER_H_
diff --git a/webrtc/call/rtc_event_log_unittest.cc b/webrtc/logging/rtc_event_log/rtc_event_log_unittest.cc
similarity index 97%
rename from webrtc/call/rtc_event_log_unittest.cc
rename to webrtc/logging/rtc_event_log/rtc_event_log_unittest.cc
index 6c4ec63..d6af3e9 100644
--- a/webrtc/call/rtc_event_log_unittest.cc
+++ b/webrtc/logging/rtc_event_log/rtc_event_log_unittest.cc
@@ -18,9 +18,9 @@
 #include "webrtc/base/checks.h"
 #include "webrtc/base/random.h"
 #include "webrtc/call.h"
-#include "webrtc/call/rtc_event_log.h"
-#include "webrtc/call/rtc_event_log_parser.h"
-#include "webrtc/call/rtc_event_log_unittest_helper.h"
+#include "webrtc/logging/rtc_event_log/rtc_event_log.h"
+#include "webrtc/logging/rtc_event_log/rtc_event_log_parser.h"
+#include "webrtc/logging/rtc_event_log/rtc_event_log_unittest_helper.h"
 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet.h"
 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/sender_report.h"
 #include "webrtc/modules/rtp_rtcp/source/rtp_header_extension.h"
@@ -33,9 +33,9 @@
 
 // Files generated at build-time by the protobuf compiler.
 #ifdef WEBRTC_ANDROID_PLATFORM_BUILD
-#include "external/webrtc/webrtc/call/rtc_event_log.pb.h"
+#include "external/webrtc/webrtc/logging/rtc_event_log/rtc_event_log.pb.h"
 #else
-#include "webrtc/call/rtc_event_log.pb.h"
+#include "webrtc/logging/rtc_event_log/rtc_event_log.pb.h"
 #endif
 
 namespace webrtc {
diff --git a/webrtc/call/rtc_event_log_unittest_helper.cc b/webrtc/logging/rtc_event_log/rtc_event_log_unittest_helper.cc
similarity index 98%
rename from webrtc/call/rtc_event_log_unittest_helper.cc
rename to webrtc/logging/rtc_event_log/rtc_event_log_unittest_helper.cc
index 566e92b..b640301 100644
--- a/webrtc/call/rtc_event_log_unittest_helper.cc
+++ b/webrtc/logging/rtc_event_log/rtc_event_log_unittest_helper.cc
@@ -8,7 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "webrtc/call/rtc_event_log_unittest_helper.h"
+#include "webrtc/logging/rtc_event_log/rtc_event_log_unittest_helper.h"
 
 #include <string.h>
 
@@ -21,9 +21,9 @@
 
 // Files generated at build-time by the protobuf compiler.
 #ifdef WEBRTC_ANDROID_PLATFORM_BUILD
-#include "external/webrtc/webrtc/call/rtc_event_log.pb.h"
+#include "external/webrtc/webrtc/logging/rtc_event_log/rtc_event_log.pb.h"
 #else
-#include "webrtc/call/rtc_event_log.pb.h"
+#include "webrtc/logging/rtc_event_log/rtc_event_log.pb.h"
 #endif
 
 namespace webrtc {
diff --git a/webrtc/call/rtc_event_log_unittest_helper.h b/webrtc/logging/rtc_event_log/rtc_event_log_unittest_helper.h
similarity index 88%
rename from webrtc/call/rtc_event_log_unittest_helper.h
rename to webrtc/logging/rtc_event_log/rtc_event_log_unittest_helper.h
index b662c3c..5ffb6f4 100644
--- a/webrtc/call/rtc_event_log_unittest_helper.h
+++ b/webrtc/logging/rtc_event_log/rtc_event_log_unittest_helper.h
@@ -8,11 +8,11 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef WEBRTC_CALL_RTC_EVENT_LOG_UNITTEST_HELPER_H_
-#define WEBRTC_CALL_RTC_EVENT_LOG_UNITTEST_HELPER_H_
+#ifndef WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_UNITTEST_HELPER_H_
+#define WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_UNITTEST_HELPER_H_
 
 #include "webrtc/call.h"
-#include "webrtc/call/rtc_event_log_parser.h"
+#include "webrtc/logging/rtc_event_log/rtc_event_log_parser.h"
 
 namespace webrtc {
 
@@ -55,4 +55,4 @@
 
 }  // namespace webrtc
 
-#endif  // WEBRTC_CALL_RTC_EVENT_LOG_UNITTEST_HELPER_H_
+#endif  // WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_UNITTEST_HELPER_H_
diff --git a/webrtc/modules/audio_coding/BUILD.gn b/webrtc/modules/audio_coding/BUILD.gn
index ef5ea96..a75fbaa 100644
--- a/webrtc/modules/audio_coding/BUILD.gn
+++ b/webrtc/modules/audio_coding/BUILD.gn
@@ -117,7 +117,7 @@
            ":audio_network_adaptor",
            ":neteq",
            ":rent_a_codec",
-           "../../call:rtc_event_log",
+           "../../logging:rtc_event_log_api",
          ]
   defines = audio_coding_defines
 }
@@ -1021,10 +1021,10 @@
       }
 
       deps = [
-        "../../:rtc_event_log_parser",
+        "../../logging:rtc_event_log_parser",
       ]
       public_deps = [
-        "../../:rtc_event_log_proto",
+        "../../logging:rtc_event_log_proto",
       ]
     }
 
diff --git a/webrtc/modules/audio_coding/DEPS b/webrtc/modules/audio_coding/DEPS
index 31aa1c2..013cce7 100644
--- a/webrtc/modules/audio_coding/DEPS
+++ b/webrtc/modules/audio_coding/DEPS
@@ -2,6 +2,7 @@
   "+webrtc/base",
   "+webrtc/call",
   "+webrtc/common_audio",
+  "+webrtc/logging/rtc_event_log",
   "+webrtc/audio_coding/neteq/neteq_unittest.pb.h",  # Different path.
   "+webrtc/system_wrappers",
 ]
diff --git a/webrtc/modules/audio_coding/audio_coding.gypi b/webrtc/modules/audio_coding/audio_coding.gypi
index 0ed3e08..5f9eb2c 100644
--- a/webrtc/modules/audio_coding/audio_coding.gypi
+++ b/webrtc/modules/audio_coding/audio_coding.gypi
@@ -147,7 +147,7 @@
       'dependencies': [
         '<@(audio_coding_dependencies)',
         '<(webrtc_root)/common.gyp:webrtc_common',
-        '<(webrtc_root)/webrtc.gyp:rtc_event_log',
+        '<(webrtc_root)/webrtc.gyp:rtc_event_log_api',
         'audio_network_adaptor',
         'neteq',
         'rent_a_codec',
diff --git a/webrtc/modules/audio_coding/neteq/tools/DEPS b/webrtc/modules/audio_coding/neteq/tools/DEPS
new file mode 100644
index 0000000..0f16a4f
--- /dev/null
+++ b/webrtc/modules/audio_coding/neteq/tools/DEPS
@@ -0,0 +1,3 @@
+include_rules = [
+  "+webrtc/logging/rtc_event_log",
+]
diff --git a/webrtc/modules/audio_coding/neteq/tools/rtc_event_log_source.cc b/webrtc/modules/audio_coding/neteq/tools/rtc_event_log_source.cc
index 517458b..6e19e93 100644
--- a/webrtc/modules/audio_coding/neteq/tools/rtc_event_log_source.cc
+++ b/webrtc/modules/audio_coding/neteq/tools/rtc_event_log_source.cc
@@ -17,7 +17,6 @@
 
 #include "webrtc/base/checks.h"
 #include "webrtc/call.h"
-#include "webrtc/call/rtc_event_log.h"
 #include "webrtc/modules/audio_coding/neteq/tools/packet.h"
 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h"
 
diff --git a/webrtc/modules/audio_coding/neteq/tools/rtc_event_log_source.h b/webrtc/modules/audio_coding/neteq/tools/rtc_event_log_source.h
index 71bf841..fad491e 100644
--- a/webrtc/modules/audio_coding/neteq/tools/rtc_event_log_source.h
+++ b/webrtc/modules/audio_coding/neteq/tools/rtc_event_log_source.h
@@ -15,7 +15,7 @@
 #include <string>
 
 #include "webrtc/base/constructormagic.h"
-#include "webrtc/call/rtc_event_log_parser.h"
+#include "webrtc/logging/rtc_event_log/rtc_event_log_parser.h"
 #include "webrtc/modules/audio_coding/neteq/tools/packet_source.h"
 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
 
diff --git a/webrtc/modules/bitrate_controller/DEPS b/webrtc/modules/bitrate_controller/DEPS
index 9a462b6..553c36b 100644
--- a/webrtc/modules/bitrate_controller/DEPS
+++ b/webrtc/modules/bitrate_controller/DEPS
@@ -1,5 +1,6 @@
 include_rules = [
   "+webrtc/base",
   "+webrtc/call",
+  "+webrtc/logging/rtc_event_log",
   "+webrtc/system_wrappers",
 ]
diff --git a/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.cc b/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.cc
index f306fb2..f09382b 100644
--- a/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.cc
+++ b/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.cc
@@ -15,9 +15,9 @@
 
 #include "webrtc/base/checks.h"
 #include "webrtc/base/logging.h"
+#include "webrtc/logging/rtc_event_log/rtc_event_log.h"
 #include "webrtc/system_wrappers/include/field_trial.h"
 #include "webrtc/system_wrappers/include/metrics.h"
-#include "webrtc/call/rtc_event_log.h"
 
 namespace webrtc {
 namespace {
diff --git a/webrtc/modules/rtp_rtcp/DEPS b/webrtc/modules/rtp_rtcp/DEPS
index 0720a15..4004651 100644
--- a/webrtc/modules/rtp_rtcp/DEPS
+++ b/webrtc/modules/rtp_rtcp/DEPS
@@ -2,5 +2,6 @@
   "+webrtc/base",
   "+webrtc/call",
   "+webrtc/common_video",
+  "+webrtc/logging/rtc_event_log",
   "+webrtc/system_wrappers",
 ]
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc b/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc
index 9882d3d..8fe3334 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc
@@ -19,8 +19,8 @@
 #include "webrtc/base/logging.h"
 #include "webrtc/base/trace_event.h"
 #include "webrtc/call.h"
-#include "webrtc/call/rtc_event_log.h"
 #include "webrtc/common_types.h"
+#include "webrtc/logging/rtc_event_log/rtc_event_log.h"
 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/app.h"
 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/bye.h"
 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/compound_packet.h"
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_sender.cc b/webrtc/modules/rtp_rtcp/source/rtp_sender.cc
index c7c60b9..2aaa58e 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_sender.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_sender.cc
@@ -19,7 +19,7 @@
 #include "webrtc/base/trace_event.h"
 #include "webrtc/base/timeutils.h"
 #include "webrtc/call.h"
-#include "webrtc/call/rtc_event_log.h"
+#include "webrtc/logging/rtc_event_log/rtc_event_log.h"
 #include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h"
 #include "webrtc/modules/rtp_rtcp/include/rtp_cvo.h"
 #include "webrtc/modules/rtp_rtcp/source/byte_io.h"
diff --git a/webrtc/test/fuzzers/BUILD.gn b/webrtc/test/fuzzers/BUILD.gn
index 0acf194..eb6104d 100644
--- a/webrtc/test/fuzzers/BUILD.gn
+++ b/webrtc/test/fuzzers/BUILD.gn
@@ -130,7 +130,7 @@
     "congestion_controller_feedback_fuzzer.cc",
   ]
   deps = [
-    "../../call:rtc_event_log",
+    "../../logging:rtc_event_log_impl",
     "../../modules/congestion_controller/",
   ]
 }
diff --git a/webrtc/test/fuzzers/congestion_controller_feedback_fuzzer.cc b/webrtc/test/fuzzers/congestion_controller_feedback_fuzzer.cc
index 6fb5f9b..496af90 100644
--- a/webrtc/test/fuzzers/congestion_controller_feedback_fuzzer.cc
+++ b/webrtc/test/fuzzers/congestion_controller_feedback_fuzzer.cc
@@ -8,7 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "webrtc/call/rtc_event_log.h"
+#include "webrtc/logging/rtc_event_log/rtc_event_log.h"
 #include "webrtc/modules/congestion_controller/include/congestion_controller.h"
 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
 #include "webrtc/modules/rtp_rtcp/source/byte_io.h"
diff --git a/webrtc/tools/BUILD.gn b/webrtc/tools/BUILD.gn
index 08206c1..1ba2018 100644
--- a/webrtc/tools/BUILD.gn
+++ b/webrtc/tools/BUILD.gn
@@ -164,8 +164,8 @@
     }
     defines = [ "ENABLE_RTC_EVENT_LOG" ]
     deps = [
-      "../:rtc_event_log_parser",
-      "../call:rtc_event_log",
+      "../logging:rtc_event_log_impl",
+      "../logging:rtc_event_log_parser",
       "../modules/congestion_controller:congestion_controller",
       "../modules/rtp_rtcp:rtp_rtcp",
       "../system_wrappers:system_wrappers_default",
@@ -173,7 +173,7 @@
     ]
     public_deps = [
       ":chart_proto",
-      "../:rtc_event_log_parser",
+      "../logging:rtc_event_log_parser",
     ]
   }
 }
@@ -282,7 +282,7 @@
         "$root_build_dir/{{source_file_part}}",
       ]
       deps = [
-        "..:rtc_event_log_proto",
+        "../logging:rtc_event_log_proto",
       ]
     }
   }
diff --git a/webrtc/tools/DEPS b/webrtc/tools/DEPS
index 507106a..ac56340 100644
--- a/webrtc/tools/DEPS
+++ b/webrtc/tools/DEPS
@@ -2,6 +2,7 @@
   "+webrtc/base",
   "+webrtc/call",
   "+webrtc/common_video",
+  "+webrtc/logging/rtc_event_log",
   "+webrtc/modules/audio_device",
   "+webrtc/modules/audio_processing",
   "+webrtc/modules/bitrate_controller",
diff --git a/webrtc/tools/event_log_visualizer/analyzer.h b/webrtc/tools/event_log_visualizer/analyzer.h
index 6f959e1..5cbcf79 100644
--- a/webrtc/tools/event_log_visualizer/analyzer.h
+++ b/webrtc/tools/event_log_visualizer/analyzer.h
@@ -18,7 +18,7 @@
 #include <utility>
 #include <vector>
 
-#include "webrtc/call/rtc_event_log_parser.h"
+#include "webrtc/logging/rtc_event_log/rtc_event_log_parser.h"
 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet.h"
 #include "webrtc/tools/event_log_visualizer/plot_base.h"
diff --git a/webrtc/tools/event_log_visualizer/main.cc b/webrtc/tools/event_log_visualizer/main.cc
index bde172a..b487696 100644
--- a/webrtc/tools/event_log_visualizer/main.cc
+++ b/webrtc/tools/event_log_visualizer/main.cc
@@ -11,7 +11,7 @@
 #include <iostream>
 
 #include "gflags/gflags.h"
-#include "webrtc/call/rtc_event_log_parser.h"
+#include "webrtc/logging/rtc_event_log/rtc_event_log_parser.h"
 #include "webrtc/tools/event_log_visualizer/analyzer.h"
 #include "webrtc/tools/event_log_visualizer/plot_base.h"
 #include "webrtc/tools/event_log_visualizer/plot_python.h"
diff --git a/webrtc/tools/tools.gyp b/webrtc/tools/tools.gyp
index b58b0c7..3b3a842 100644
--- a/webrtc/tools/tools.gyp
+++ b/webrtc/tools/tools.gyp
@@ -118,7 +118,7 @@
           'target_name': 'event_log_visualizer_utils',
           'type': 'static_library',
           'dependencies': [
-            '<(webrtc_root)/webrtc.gyp:rtc_event_log',
+            '<(webrtc_root)/webrtc.gyp:rtc_event_log_impl',
             '<(webrtc_root)/webrtc.gyp:rtc_event_log_parser',
             '<(webrtc_root)/modules/modules.gyp:congestion_controller',
             '<(webrtc_root)/modules/modules.gyp:rtp_rtcp',
diff --git a/webrtc/video/BUILD.gn b/webrtc/video/BUILD.gn
index d411dad..294d30c 100644
--- a/webrtc/video/BUILD.gn
+++ b/webrtc/video/BUILD.gn
@@ -58,8 +58,8 @@
     "..:webrtc_common",
     "../base:rtc_base_approved",
     "../base:rtc_task_queue",
-    "../call:rtc_event_log",
     "../common_video",
+    "../logging:rtc_event_log_api",
     "../modules/bitrate_controller",
     "../modules/congestion_controller",
     "../modules/pacing",
diff --git a/webrtc/video/webrtc_video.gypi b/webrtc/video/webrtc_video.gypi
index af162de..dde8552 100644
--- a/webrtc/video/webrtc_video.gypi
+++ b/webrtc/video/webrtc_video.gypi
@@ -21,7 +21,7 @@
       '<(webrtc_root)/modules/modules.gyp:webrtc_video_coding',
       '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
       '<(webrtc_root)/voice_engine/voice_engine.gyp:voice_engine',
-      '<(webrtc_root)/webrtc.gyp:rtc_event_log',
+      '<(webrtc_root)/webrtc.gyp:rtc_event_log_api',
     ],
     'webrtc_video_sources': [
       'video/call_stats.cc',
diff --git a/webrtc/voice_engine/BUILD.gn b/webrtc/voice_engine/BUILD.gn
index 8450d1d..dd5546b 100644
--- a/webrtc/voice_engine/BUILD.gn
+++ b/webrtc/voice_engine/BUILD.gn
@@ -92,8 +92,8 @@
     "..:webrtc_common",
     "../api:call_api",
     "../base:rtc_base_approved",
-    "../call:rtc_event_log",
     "../common_audio",
+    "../logging:rtc_event_log_api",
     "../modules/audio_conference_mixer",
     "../modules/audio_device",
     "../modules/audio_processing",
@@ -244,7 +244,7 @@
       ":voice_engine",
       "//testing/gtest",
       "//third_party/gflags",
-      "//webrtc/call:rtc_event_log",
+      "//webrtc/logging:rtc_event_log_api",
       "//webrtc/system_wrappers",
       "//webrtc/system_wrappers:system_wrappers_default",
       "//webrtc/test:test_support",
@@ -271,7 +271,7 @@
         "//testing/gmock",
         "//testing/gtest",
         "//third_party/gflags",
-        "//webrtc/call:rtc_event_log",
+        "//webrtc/logging:rtc_event_log_api",
         "//webrtc/modules/video_capture",
         "//webrtc/system_wrappers",
         "//webrtc/system_wrappers/:system_wrappers_default",
diff --git a/webrtc/voice_engine/DEPS b/webrtc/voice_engine/DEPS
index 224eeee..18efd81 100644
--- a/webrtc/voice_engine/DEPS
+++ b/webrtc/voice_engine/DEPS
@@ -2,6 +2,7 @@
   "+webrtc/base",
   "+webrtc/call",
   "+webrtc/common_audio",
+  "+webrtc/logging/rtc_event_log",
   "+webrtc/modules/audio_coding",
   "+webrtc/modules/audio_conference_mixer",
   "+webrtc/modules/audio_device",
diff --git a/webrtc/voice_engine/channel.cc b/webrtc/voice_engine/channel.cc
index 582bde5..ce9770e 100644
--- a/webrtc/voice_engine/channel.cc
+++ b/webrtc/voice_engine/channel.cc
@@ -20,8 +20,8 @@
 #include "webrtc/base/rate_limiter.h"
 #include "webrtc/base/thread_checker.h"
 #include "webrtc/base/timeutils.h"
-#include "webrtc/call/rtc_event_log.h"
 #include "webrtc/config.h"
+#include "webrtc/logging/rtc_event_log/rtc_event_log.h"
 #include "webrtc/modules/audio_device/include/audio_device.h"
 #include "webrtc/modules/audio_processing/include/audio_processing.h"
 #include "webrtc/modules/include/module_common_types.h"
diff --git a/webrtc/voice_engine/test/auto_test/standard/codec_test.cc b/webrtc/voice_engine/test/auto_test/standard/codec_test.cc
index 5a500af..dad03ba 100644
--- a/webrtc/voice_engine/test/auto_test/standard/codec_test.cc
+++ b/webrtc/voice_engine/test/auto_test/standard/codec_test.cc
@@ -11,7 +11,6 @@
 #include <stdio.h>
 #include <string>
 
-#include "webrtc/call/rtc_event_log.h"
 #include "webrtc/test/test_suite.h"
 #include "webrtc/test/testsupport/fileutils.h"
 #include "webrtc/voice_engine/test/auto_test/fixtures/after_streaming_fixture.h"
diff --git a/webrtc/voice_engine/voice_engine.gyp b/webrtc/voice_engine/voice_engine.gyp
index 61dd2c0..c264fe7 100644
--- a/webrtc/voice_engine/voice_engine.gyp
+++ b/webrtc/voice_engine/voice_engine.gyp
@@ -29,7 +29,7 @@
         '<(webrtc_root)/modules/modules.gyp:rtp_rtcp',
         '<(webrtc_root)/modules/modules.gyp:webrtc_utility',
         '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
-        '<(webrtc_root)/webrtc.gyp:rtc_event_log',
+        '<(webrtc_root)/webrtc.gyp:rtc_event_log_api',
         'level_indicator',
       ],
       'export_dependent_settings': [
diff --git a/webrtc/webrtc.gyp b/webrtc/webrtc.gyp
index a4c1c1d..98d9498 100644
--- a/webrtc/webrtc.gyp
+++ b/webrtc/webrtc.gyp
@@ -32,7 +32,7 @@
         '<@(webrtc_audio_dependencies)',
         '<@(webrtc_call_dependencies)',
         '<@(webrtc_video_dependencies)',
-        'rtc_event_log',
+        'rtc_event_log_impl',
       ],
       'conditions': [
         # TODO(andresp): Chromium should link directly with this and no if
@@ -45,19 +45,27 @@
       ],
     },
     {
-      'target_name': 'rtc_event_log',
+      'target_name': 'rtc_event_log_api',
       'type': 'static_library',
       'sources': [
-        'call/rtc_event_log.cc',
-        'call/rtc_event_log.h',
-        'call/rtc_event_log_helper_thread.cc',
-        'call/rtc_event_log_helper_thread.h',
+        'logging/rtc_event_log/rtc_event_log.h',
+      ],
+    },
+    {
+      'target_name': 'rtc_event_log_impl',
+      'type': 'static_library',
+      'sources': [
+        'logging/rtc_event_log/ringbuffer.h',
+        'logging/rtc_event_log/rtc_event_log.cc',
+        'logging/rtc_event_log/rtc_event_log_helper_thread.cc',
+        'logging/rtc_event_log/rtc_event_log_helper_thread.h',
       ],
       'conditions': [
         # If enable_protobuf is defined, we want to compile the protobuf
         # and add rtc_event_log.pb.h and rtc_event_log.pb.cc to the sources.
         ['enable_protobuf==1', {
           'dependencies': [
+            'rtc_event_log_api',
             'rtc_event_log_proto',
           ],
           'defines': [
@@ -79,10 +87,10 @@
           # This target should only be built if enable_protobuf is defined
           'target_name': 'rtc_event_log_proto',
           'type': 'static_library',
-          'sources': ['call/rtc_event_log.proto',],
+          'sources': ['logging/rtc_event_log/rtc_event_log.proto',],
           'variables': {
-            'proto_in_dir': 'call',
-            'proto_out_dir': 'webrtc/call',
+            'proto_in_dir': 'logging/rtc_event_log',
+            'proto_out_dir': 'webrtc/logging/rtc_event_log',
           },
           'includes': ['build/protoc.gypi'],
         },
@@ -90,8 +98,8 @@
           'target_name': 'rtc_event_log_parser',
           'type': 'static_library',
           'sources': [
-            'call/rtc_event_log_parser.cc',
-            'call/rtc_event_log_parser.h',
+            'logging/rtc_event_log/rtc_event_log_parser.cc',
+            'logging/rtc_event_log/rtc_event_log_parser.h',
           ],
           'dependencies': [
             'rtc_event_log_proto',
@@ -107,7 +115,7 @@
         {
           'target_name': 'rtc_event_log2rtp_dump',
           'type': 'executable',
-          'sources': ['call/rtc_event_log2rtp_dump.cc',],
+          'sources': ['logging/rtc_event_log2rtp_dump.cc',],
           'dependencies': [
             '<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
             'rtc_event_log_parser',