summaryrefslogtreecommitdiff
path: root/absl/base/internal/raw_logging.h
diff options
context:
space:
mode:
authorGravatar Andy Getzendanner <durandal@google.com>2022-05-04 09:23:27 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2022-05-04 09:24:08 -0700
commit981e2c888094c26f54adce260e05fd29e07e5fc8 (patch)
tree05acc93af25610ff988b1e96f495cc44d135eeb5 /absl/base/internal/raw_logging.h
parent8d9cef25c70321c794ff5559cc0b1e0fa5f85e72 (diff)
raw_logging: Rename LogPrefixHook to reflect the other half of it's job (filtering by severity).
PiperOrigin-RevId: 446476285 Change-Id: Ibd0913e06244424241200d17177a4f220fcb7861
Diffstat (limited to 'absl/base/internal/raw_logging.h')
-rw-r--r--absl/base/internal/raw_logging.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/absl/base/internal/raw_logging.h b/absl/base/internal/raw_logging.h
index 2bf7aaba..efe28dac 100644
--- a/absl/base/internal/raw_logging.h
+++ b/absl/base/internal/raw_logging.h
@@ -148,11 +148,12 @@ bool RawLoggingFullySupported();
// 'severity' is the severity level of the message being written.
// 'file' and 'line' are the file and line number where the ABSL_RAW_LOG macro
// was located.
-// 'buffer' and 'buf_size' are pointers to the buffer and buffer size. If the
-// hook writes a prefix, it must increment *buffer and decrement *buf_size
+// 'buf' and 'buf_size' are pointers to the buffer and buffer size. If the
+// hook writes a prefix, it must increment *buf and decrement *buf_size
// accordingly.
-using LogPrefixHook = bool (*)(absl::LogSeverity severity, const char* file,
- int line, char** buffer, int* buf_size);
+using LogFilterAndPrefixHook = bool (*)(absl::LogSeverity severity,
+ const char* file, int line, char** buf,
+ int* buf_size);
// Function type for a raw_logging customization hook called to abort a process
// when a FATAL message is logged. If the provided AbortHook() returns, the
@@ -162,7 +163,7 @@ using LogPrefixHook = bool (*)(absl::LogSeverity severity, const char* file,
// was located.
// The NUL-terminated logged message lives in the buffer between 'buf_start'
// and 'buf_end'. 'prefix_end' points to the first non-prefix character of the
-// buffer (as written by the LogPrefixHook.)
+// buffer (as written by the LogFilterAndPrefixHook.)
using AbortHook = void (*)(const char* file, int line, const char* buf_start,
const char* prefix_end, const char* buf_end);
@@ -184,7 +185,7 @@ ABSL_INTERNAL_ATOMIC_HOOK_ATTRIBUTES ABSL_DLL extern base_internal::AtomicHook<
//
// These functions are safe to call at any point during initialization; they do
// not block or malloc, and are async-signal safe.
-void RegisterLogPrefixHook(LogPrefixHook func);
+void RegisterLogFilterAndPrefixHook(LogFilterAndPrefixHook func);
void RegisterAbortHook(AbortHook func);
void RegisterInternalLogFunction(InternalLogFunction func);