Switch glog to absl::log.

PiperOrigin-RevId: 615535748
This commit is contained in:
Francis Tsui
2024-03-13 14:03:23 -07:00
committed by Copybara-Service
parent 5859dd5513
commit a082f36021
16 changed files with 18 additions and 55 deletions
-51
View File
@@ -47,31 +47,12 @@ http_archive(
urls = ["https://github.com/abseil/abseil-cpp/archive/4038192a57cb75f7ee671f81a3378ff4c74c4f8e.zip"],
)
# Using a protobuf javalite version that contains @com_google_protobuf_javalite//:javalite_toolchain
http_archive(
name = "com_google_protobuf_javalite",
strip_prefix = "protobuf-javalite",
urls = ["https://github.com/google/protobuf/archive/javalite.zip"],
)
http_archive(
name = "com_google_protobuf",
strip_prefix = "protobuf-3.21.12",
urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.21.12.tar.gz"],
)
http_archive(
name = "com_google_protobuf_cc",
strip_prefix = "protobuf-3.21.12",
urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.21.12.tar.gz"],
)
http_archive(
name = "com_google_protobuf_java",
strip_prefix = "protobuf-3.21.12",
urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.21.12.tar.gz"],
)
# Load common dependencies.
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
protobuf_deps()
@@ -79,13 +60,6 @@ load("@rules_cc//cc:repositories.bzl", "rules_cc_dependencies", "rules_cc_toolch
rules_cc_dependencies()
rules_cc_toolchains()
http_archive(
name = "com_google_glog",
sha256 = "f28359aeba12f30d73d9e4711ef356dc842886968112162bc73002645139c39c",
strip_prefix = "glog-0.4.0",
urls = ["https://github.com/google/glog/archive/v0.4.0.tar.gz"],
)
http_archive(
name = "com_google_ukey2",
strip_prefix = "ukey2-master",
@@ -131,22 +105,6 @@ http_archive(
urls = ["https://github.com/google/googletest/archive/main.zip"],
)
http_archive(
name = "com_google_webrtc",
build_file_content = """
package(default_visibility = ["//visibility:public"])
""",
urls = ["https://webrtc.googlesource.com/src/+archive/main.tar.gz"],
)
# gflags needed by glog
http_archive(
name = "com_github_gflags_gflags",
strip_prefix = "gflags-2.2.2",
sha256 = "19713a36c9f32b33df59d1c79b4958434cb005b5b47dc5400a7a4b078111d9b5",
url = "https://github.com/gflags/gflags/archive/v2.2.2.zip",
)
# ----------------------------------------------
# Nisaba: Script processing library from Google:
# ----------------------------------------------
@@ -180,12 +138,3 @@ http_archive(
urls = ["https://github.com/inazarenko/protobuf-matchers/archive/refs/heads/master.zip"],
strip_prefix = "protobuf-matchers-master",
)
http_archive(
name = "com_googlesource_code_re2",
sha256 = "26155e050b10b5969e986dab35654247a3b1b295e0532880b5a9c13c0a700ceb",
strip_prefix = "re2-2021-06-01",
urls = [
"https://github.com/google/re2/archive/refs/tags/2021-06-01.tar.gz",
],
)
+1
View File
@@ -13,6 +13,7 @@
# limitations under the License.
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
licenses(["notice"])
+1
View File
@@ -1,4 +1,5 @@
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
licenses(["notice"])
+1
View File
@@ -1,4 +1,5 @@
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
licenses(["notice"])
+1 -1
View File
@@ -358,11 +358,11 @@ cc_library(
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/functional:any_invocable",
"@com_google_absl//absl/log",
"@com_google_absl//absl/log:check",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/synchronization",
"@com_google_absl//absl/time",
"@com_google_glog//:glog",
],
)
+1 -1
View File
@@ -53,11 +53,11 @@ cc_library(
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/container:btree",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/log:log_streamer",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/synchronization",
"@com_google_absl//absl/time",
"@com_google_absl//absl/types:span",
"@com_google_glog//:glog",
"@com_google_nisaba//nisaba/port:thread_pool",
"@nlohmann_json//:json",
],
@@ -15,7 +15,7 @@
#ifndef PLATFORM_IMPL_G3_LOG_MESSAGE_H_
#define PLATFORM_IMPL_G3_LOG_MESSAGE_H_
#include "glog/logging.h"
#include "absl/log/log_streamer.h"
#include "internal/platform/implementation/log_message.h"
namespace nearby {
+4 -1
View File
@@ -37,7 +37,10 @@
#define CHECK_GE(a, b) static_cast<void>(0), a >= b ? (void) 0 : abort()
#define DCHECK_GE(a, b) static_cast<void>(0), a >= b ? (void) 0 : abort()
#else
#include "glog/logging.h"
// IWYU pragma: begin_exports
#include "absl/log/check.h"
#include "absl/log/log.h"
// IWYU pragma: end_exports
#endif
#include "internal/platform/implementation/log_message.h"
#include "internal/platform/implementation/platform.h"
+1
View File
@@ -1,4 +1,5 @@
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
# NOTE: gRPC libraries not needed.
proto_library(
+1
View File
@@ -13,6 +13,7 @@
# limitations under the License.
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
licenses(["notice"])
+1
View File
@@ -1,4 +1,5 @@
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
proto_library(
name = "presence_frame_proto",
+1
View File
@@ -17,6 +17,7 @@
# Placeholder: load py_proto_library
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
licenses(["notice"])
+1
View File
@@ -15,6 +15,7 @@
# Proto for Nearby products
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
licenses(["notice"])
+1
View File
@@ -13,6 +13,7 @@
# limitations under the License.
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
licenses(["notice"])
+1
View File
@@ -1,4 +1,5 @@
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
licenses(["notice"])
+1
View File
@@ -13,6 +13,7 @@
# limitations under the License.
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
licenses(["notice"])