Commit fbe46601 by Christian Blichmann Committed by Copybara-Service

Remove internal `VLOG_xxx` macros

Those have been exported by accident and are using internal machinery to
implement verbose logging.

PiperOrigin-RevId: 480815356
Change-Id: I84f6b6dac562cb27634d6538023eda66bed9a7f8
parent e58d05ef
...@@ -196,9 +196,6 @@ ...@@ -196,9 +196,6 @@
// Example: // Example:
// //
// LOG_IF(INFO, num_cookies > 10) << "Got lots of cookies"; // LOG_IF(INFO, num_cookies > 10) << "Got lots of cookies";
//
// There is no `VLOG_IF` because the order of evaluation of the arguments is
// ambiguous and the alternate spelling with an `if`-statement is trivial.
#define LOG_IF(severity, condition) \ #define LOG_IF(severity, condition) \
ABSL_LOG_INTERNAL_CONDITION_##severity(STATELESS, condition) \ ABSL_LOG_INTERNAL_CONDITION_##severity(STATELESS, condition) \
ABSL_LOGGING_INTERNAL_LOG_##severity.InternalStream() ABSL_LOGGING_INTERNAL_LOG_##severity.InternalStream()
...@@ -318,42 +315,6 @@ ...@@ -318,42 +315,6 @@
(EveryNSec, n_seconds) ABSL_LOGGING_INTERNAL_LOG_##severity.InternalStream() (EveryNSec, n_seconds) ABSL_LOGGING_INTERNAL_LOG_##severity.InternalStream()
#endif // def NDEBUG #endif // def NDEBUG
#define VLOG_EVERY_N(verbose_level, n) \
for (int absl_logging_internal_verbose_level = (verbose_level), \
absl_logging_internal_log_loop = 1; \
absl_logging_internal_log_loop; absl_logging_internal_log_loop = 0) \
ABSL_LOG_INTERNAL_CONDITION_INFO( \
STATEFUL, VLOG_IS_ON(absl_logging_internal_verbose_level)) \
(EveryN, n) ABSL_LOGGING_INTERNAL_LOG_INFO.InternalStream().WithVerbosity( \
absl_logging_internal_verbose_level)
#define VLOG_FIRST_N(verbose_level, n) \
for (int absl_logging_internal_verbose_level = (verbose_level), \
absl_logging_internal_log_loop = 1; \
absl_logging_internal_log_loop; absl_logging_internal_log_loop = 0) \
ABSL_LOG_INTERNAL_CONDITION_INFO( \
STATEFUL, VLOG_IS_ON(absl_logging_internal_verbose_level)) \
(FirstN, n) ABSL_LOGGING_INTERNAL_LOG_INFO.InternalStream().WithVerbosity( \
absl_logging_internal_verbose_level)
#define VLOG_EVERY_POW_2(verbose_level) \
for (int absl_logging_internal_verbose_level = (verbose_level), \
absl_logging_internal_log_loop = 1; \
absl_logging_internal_log_loop; absl_logging_internal_log_loop = 0) \
ABSL_LOG_INTERNAL_CONDITION_INFO( \
STATEFUL, VLOG_IS_ON(absl_logging_internal_verbose_level)) \
(EveryPow2) ABSL_LOGGING_INTERNAL_LOG_INFO.InternalStream().WithVerbosity( \
absl_logging_internal_verbose_level)
#define VLOG_EVERY_N_SEC(verbose_level, n_seconds) \
for (int absl_logging_internal_verbose_level = (verbose_level), \
absl_logging_internal_log_loop = 1; \
absl_logging_internal_log_loop; absl_logging_internal_log_loop = 0) \
ABSL_LOG_INTERNAL_CONDITION_INFO( \
STATEFUL, VLOG_IS_ON(absl_logging_internal_verbose_level)) \
(EveryNSec, n_seconds) ABSL_LOGGING_INTERNAL_LOG_INFO.InternalStream() \
.WithVerbosity(absl_logging_internal_verbose_level)
// `LOG_IF_EVERY_N` and friends behave as the corresponding `LOG_EVERY_N` // `LOG_IF_EVERY_N` and friends behave as the corresponding `LOG_EVERY_N`
// but neither increment a counter nor log a message if condition is false (as // but neither increment a counter nor log a message if condition is false (as
// `LOG_IF`). // `LOG_IF`).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment