summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2024-03-19 08:53:29 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2024-03-19 08:54:28 -0700
commitfa6a3cd6c9e9f01164a0e4b5d2d8f0dbd1453fee (patch)
tree4c44e9090027326fb8914bbc3a29a032a24e50e1
parenta41e0168bf2e4f071adc145e0ea8ccec767cd98f (diff)
Add a note about the cost of `VLOG` in non-debug builds.
PiperOrigin-RevId: 617186944 Change-Id: Id540fb42b02f24ad92b8f3898231f01ac004e191
-rw-r--r--absl/log/log.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/absl/log/log.h b/absl/log/log.h
index 90415fa8..a4e1d1fe 100644
--- a/absl/log/log.h
+++ b/absl/log/log.h
@@ -233,6 +233,11 @@
//
// See vlog_is_on.h for further documentation, including the usage of the
// --vmodule flag to log at different levels in different source files.
+//
+// `VLOG` does not produce any output when verbose logging is not enabled.
+// However, simply testing whether verbose logging is enabled can be expensive.
+// If you don't intend to enable verbose logging in non-debug builds, consider
+// using `DVLOG` instead.
#define VLOG(severity) ABSL_LOG_INTERNAL_VLOG_IMPL(severity)
// `DVLOG` behaves like `VLOG` in debug mode (i.e. `#ifndef NDEBUG`).