summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Andy Getzendanner <durandal@google.com>2022-07-20 13:10:28 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2022-07-20 13:11:43 -0700
commit2c489bb5f0b1208da6dc035b07a30f0f67915b23 (patch)
tree128bd9d4fe663b1cde9dcab926c50cc954ec378d
parent0c8bd82e90bac01f8afc6afdd5754d9d9b16cf68 (diff)
Renamespace absl::raw_logging_internal to absl::raw_log_internal to match (upcoming) non-raw logging namespace.
PiperOrigin-RevId: 462213222 Change-Id: I3b9371097b368d55cc86b6106d6dec24ce122762
-rw-r--r--absl/base/internal/raw_logging.cc4
-rw-r--r--absl/base/internal/raw_logging.h47
-rw-r--r--absl/debugging/failure_signal_handler.cc2
3 files changed, 26 insertions, 27 deletions
diff --git a/absl/base/internal/raw_logging.cc b/absl/base/internal/raw_logging.cc
index 54e71a3f..a5d9fa59 100644
--- a/absl/base/internal/raw_logging.cc
+++ b/absl/base/internal/raw_logging.cc
@@ -72,7 +72,7 @@
namespace absl {
ABSL_NAMESPACE_BEGIN
-namespace raw_logging_internal {
+namespace raw_log_internal {
namespace {
// TODO(gfalcon): We want raw-logging to work on as many platforms as possible.
@@ -244,6 +244,6 @@ void RegisterInternalLogFunction(InternalLogFunction func) {
internal_log_function.Store(func);
}
-} // namespace raw_logging_internal
+} // namespace raw_log_internal
ABSL_NAMESPACE_END
} // namespace absl
diff --git a/absl/base/internal/raw_logging.h b/absl/base/internal/raw_logging.h
index 0747c9df..db2ef38e 100644
--- a/absl/base/internal/raw_logging.h
+++ b/absl/base/internal/raw_logging.h
@@ -43,12 +43,11 @@
#define ABSL_RAW_LOG(severity, ...) \
do { \
- constexpr const char* absl_raw_logging_internal_basename = \
- ::absl::raw_logging_internal::Basename(__FILE__, \
- sizeof(__FILE__) - 1); \
- ::absl::raw_logging_internal::RawLog(ABSL_RAW_LOGGING_INTERNAL_##severity, \
- absl_raw_logging_internal_basename, \
- __LINE__, __VA_ARGS__); \
+ constexpr const char* absl_raw_log_internal_basename = \
+ ::absl::raw_log_internal::Basename(__FILE__, sizeof(__FILE__) - 1); \
+ ::absl::raw_log_internal::RawLog(ABSL_RAW_LOG_INTERNAL_##severity, \
+ absl_raw_log_internal_basename, __LINE__, \
+ __VA_ARGS__); \
} while (0)
// Similar to CHECK(condition) << message, but for low-level modules:
@@ -72,14 +71,14 @@
//
// The API is a subset of the above: each macro only takes two arguments. Use
// StrCat if you need to build a richer message.
-#define ABSL_INTERNAL_LOG(severity, message) \
- do { \
- constexpr const char* absl_raw_logging_internal_filename = __FILE__; \
- ::absl::raw_logging_internal::internal_log_function( \
- ABSL_RAW_LOGGING_INTERNAL_##severity, \
- absl_raw_logging_internal_filename, __LINE__, message); \
- if (ABSL_RAW_LOGGING_INTERNAL_##severity == ::absl::LogSeverity::kFatal) \
- ABSL_INTERNAL_UNREACHABLE; \
+#define ABSL_INTERNAL_LOG(severity, message) \
+ do { \
+ constexpr const char* absl_raw_log_internal_filename = __FILE__; \
+ ::absl::raw_log_internal::internal_log_function( \
+ ABSL_RAW_LOG_INTERNAL_##severity, absl_raw_log_internal_filename, \
+ __LINE__, message); \
+ if (ABSL_RAW_LOG_INTERNAL_##severity == ::absl::LogSeverity::kFatal) \
+ ABSL_INTERNAL_UNREACHABLE; \
} while (0)
#define ABSL_INTERNAL_CHECK(condition, message) \
@@ -91,16 +90,16 @@
} \
} while (0)
-#define ABSL_RAW_LOGGING_INTERNAL_INFO ::absl::LogSeverity::kInfo
-#define ABSL_RAW_LOGGING_INTERNAL_WARNING ::absl::LogSeverity::kWarning
-#define ABSL_RAW_LOGGING_INTERNAL_ERROR ::absl::LogSeverity::kError
-#define ABSL_RAW_LOGGING_INTERNAL_FATAL ::absl::LogSeverity::kFatal
-#define ABSL_RAW_LOGGING_INTERNAL_LEVEL(severity) \
+#define ABSL_RAW_LOG_INTERNAL_INFO ::absl::LogSeverity::kInfo
+#define ABSL_RAW_LOG_INTERNAL_WARNING ::absl::LogSeverity::kWarning
+#define ABSL_RAW_LOG_INTERNAL_ERROR ::absl::LogSeverity::kError
+#define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
+#define ABSL_RAW_LOG_INTERNAL_LEVEL(severity) \
::absl::NormalizeLogSeverity(severity)
namespace absl {
ABSL_NAMESPACE_BEGIN
-namespace raw_logging_internal {
+namespace raw_log_internal {
// Helper function to implement ABSL_RAW_LOG
// Logs format... at "severity" level, reporting it
@@ -130,7 +129,7 @@ constexpr const char* Basename(const char* fname, int offset) {
// TODO(gfalcon): Come up with a better name for this method.
bool RawLoggingFullySupported();
-// Function type for a raw_logging customization hook for suppressing messages
+// Function type for a raw_log customization hook for suppressing messages
// by severity, and for writing custom prefixes on non-suppressed messages.
//
// The installed hook is called for every raw log invocation. The message will
@@ -139,7 +138,7 @@ bool RawLoggingFullySupported();
// also provided with an output buffer, where it can write a custom log message
// prefix.
//
-// The raw_logging system does not allocate memory or grab locks. User-provided
+// The raw_log system does not allocate memory or grab locks. User-provided
// hooks must avoid these operations, and must not throw exceptions.
//
// 'severity' is the severity level of the message being written.
@@ -152,7 +151,7 @@ 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
+// Function type for a raw_log customization hook called to abort a process
// when a FATAL message is logged. If the provided AbortHook() returns, the
// logging system will call abort().
//
@@ -189,7 +188,7 @@ void RegisterLogFilterAndPrefixHook(LogFilterAndPrefixHook func);
void RegisterAbortHook(AbortHook func);
void RegisterInternalLogFunction(InternalLogFunction func);
-} // namespace raw_logging_internal
+} // namespace raw_log_internal
ABSL_NAMESPACE_END
} // namespace absl
diff --git a/absl/debugging/failure_signal_handler.cc b/absl/debugging/failure_signal_handler.cc
index 8e75e54b..6672ee60 100644
--- a/absl/debugging/failure_signal_handler.cc
+++ b/absl/debugging/failure_signal_handler.cc
@@ -218,7 +218,7 @@ static void InstallOneFailureHandler(FailureSignalData* data,
#endif
static void WriteToStderr(const char* data) {
- absl::raw_logging_internal::AsyncSignalSafeWriteToStderr(data, strlen(data));
+ absl::raw_log_internal::AsyncSignalSafeWriteToStderr(data, strlen(data));
}
static void WriteSignalMessage(int signo, int cpu,