Use GlobalLock to protect logging

rtc::CriticalSection has non-trivial destructor and thus
shouldn't be used for variable with static storage duration


Bug: None
Change-Id: I5b9d9036aa90eb0c652f6b17ea1162dea0362640
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156563
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29469}
diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn
index 0fee5e0..17cf3f5 100644
--- a/rtc_base/BUILD.gn
+++ b/rtc_base/BUILD.gn
@@ -247,6 +247,7 @@
     ":platform_thread_types",
     ":stringutils",
     ":timeutils",
+    "//third_party/abseil-cpp/absl/base:core_headers",
     "//third_party/abseil-cpp/absl/meta:type_traits",
     "//third_party/abseil-cpp/absl/strings",
   ]