Skip to content

Commit

Permalink
#Centipede Switch to now-available OSS-ed VLOG and friends
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 589870753
  • Loading branch information
ussuri authored and copybara-github committed Dec 13, 2023
1 parent 28a3e8c commit f26bc1a
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 90 deletions.
6 changes: 3 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ http_archive(

http_archive(
name = "com_google_absl",
sha256 = "f17ba8d569af3ebf649cbce80d089fed35e046a44f40e0714b6bd6fe83d82738",
strip_prefix = "abseil-cpp-db08109eeb15fcd856761557f1668c2b34690036",
url = "https://github.com/abseil/abseil-cpp/archive/db08109eeb15fcd856761557f1668c2b34690036.tar.gz",
sha256 = "0ddd37f347c58d89f449dd189a645bfd97bcd85c5284404a3af27a3ca3476f39",
strip_prefix = "abseil-cpp-fad946221cec37175e762c399760f54b9de9a9fa",
url = "https://github.com/abseil/abseil-cpp/archive/fad946221cec37175e762c399760f54b9de9a9fa.tar.gz",
)

http_archive(
Expand Down
13 changes: 0 additions & 13 deletions centipede/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,8 @@ cc_library(

cc_library(
name = "logging",
srcs = ["logging.cc"],
hdrs = ["logging.h"],
deps = [
"@com_google_absl//absl/flags:flag",
"@com_google_absl//absl/log",
"@com_google_absl//absl/log:check",
],
Expand Down Expand Up @@ -1233,17 +1231,6 @@ cc_test(
],
)

cc_test(
name = "logging_test",
srcs = ["logging_test.cc"],
deps = [
":logging",
"@com_google_absl//absl/flags:flag",
"@com_google_absl//absl/log:scoped_mock_log",
"@com_google_googletest//:gtest_main",
],
)

cc_test(
name = "util_test",
srcs = ["util_test.cc"],
Expand Down
3 changes: 3 additions & 0 deletions centipede/control_flow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,19 @@

#include <cstddef>
#include <cstdint>
#include <cstdlib>
#include <filesystem> // NOLINT
#include <fstream>
#include <queue>
#include <string>
#include <string_view>
#include <vector>

#include "absl/container/flat_hash_set.h"
#include "absl/log/check.h"
#include "absl/log/log.h"
#include "absl/strings/match.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_split.h"
#include "./centipede/command.h"
#include "./centipede/defs.h"
Expand Down
18 changes: 0 additions & 18 deletions centipede/logging.cc

This file was deleted.

14 changes: 5 additions & 9 deletions centipede/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,11 @@
#ifndef THIRD_PARTY_CENTIPEDE_LOGGING_H_
#define THIRD_PARTY_CENTIPEDE_LOGGING_H_

#include "absl/log/check.h"
#include "absl/log/log.h"
#include "absl/flags/flag.h" // absl::GetFlag
#include "absl/flags/declare.h" // ABSL_DECLARE_FLAG

ABSL_DECLARE_FLAG(int, v);

#define VLOG_IS_ON(logging_level) ((logging_level) <= absl::GetFlag(FLAGS_v))
#define VLOG(logging_level) LOG_IF(INFO, VLOG_IS_ON(logging_level))
// TODO(b/315519925): Temporary leftover from switching to now-available
// OSS Abseil VLOG and friends. Explicitly include these wherever necessary and
// remove from here.
#include "absl/log/check.h" // IWYU pragma: keep
#include "absl/log/log.h" // IWYU pragma: keep

// Easy variable value logging: LOG(INFO) << VV(foo) << VV(bar);
#define VV(x) #x ": " << (x) << " "
Expand Down
47 changes: 0 additions & 47 deletions centipede/logging_test.cc

This file was deleted.

1 change: 1 addition & 0 deletions centipede/rusage_profiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@
#include <ostream>
#include <string>

#include "absl/strings/str_cat.h" // IWYU pragma: keep
#include "absl/synchronization/mutex.h"
#include "absl/time/time.h"
#include "./centipede/rusage_stats.h"
Expand Down

0 comments on commit f26bc1a

Please sign in to comment.