Commit 2c489bb5 by Andy Getzendanner Committed by Copybara-Service

Renamespace absl::raw_logging_internal to absl::raw_log_internal to match…

Renamespace absl::raw_logging_internal to absl::raw_log_internal to match (upcoming) non-raw logging namespace.

PiperOrigin-RevId: 462213222
Change-Id: I3b9371097b368d55cc86b6106d6dec24ce122762
parent 0c8bd82e
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
namespace absl { namespace absl {
ABSL_NAMESPACE_BEGIN ABSL_NAMESPACE_BEGIN
namespace raw_logging_internal { namespace raw_log_internal {
namespace { namespace {
// TODO(gfalcon): We want raw-logging to work on as many platforms as possible. // TODO(gfalcon): We want raw-logging to work on as many platforms as possible.
...@@ -244,6 +244,6 @@ void RegisterInternalLogFunction(InternalLogFunction func) { ...@@ -244,6 +244,6 @@ void RegisterInternalLogFunction(InternalLogFunction func) {
internal_log_function.Store(func); internal_log_function.Store(func);
} }
} // namespace raw_logging_internal } // namespace raw_log_internal
ABSL_NAMESPACE_END ABSL_NAMESPACE_END
} // namespace absl } // namespace absl
...@@ -43,12 +43,11 @@ ...@@ -43,12 +43,11 @@
#define ABSL_RAW_LOG(severity, ...) \ #define ABSL_RAW_LOG(severity, ...) \
do { \ do { \
constexpr const char* absl_raw_logging_internal_basename = \ constexpr const char* absl_raw_log_internal_basename = \
::absl::raw_logging_internal::Basename(__FILE__, \ ::absl::raw_log_internal::Basename(__FILE__, sizeof(__FILE__) - 1); \
sizeof(__FILE__) - 1); \ ::absl::raw_log_internal::RawLog(ABSL_RAW_LOG_INTERNAL_##severity, \
::absl::raw_logging_internal::RawLog(ABSL_RAW_LOGGING_INTERNAL_##severity, \ absl_raw_log_internal_basename, __LINE__, \
absl_raw_logging_internal_basename, \ __VA_ARGS__); \
__LINE__, __VA_ARGS__); \
} while (0) } while (0)
// Similar to CHECK(condition) << message, but for low-level modules: // Similar to CHECK(condition) << message, but for low-level modules:
...@@ -74,11 +73,11 @@ ...@@ -74,11 +73,11 @@
// StrCat if you need to build a richer message. // StrCat if you need to build a richer message.
#define ABSL_INTERNAL_LOG(severity, message) \ #define ABSL_INTERNAL_LOG(severity, message) \
do { \ do { \
constexpr const char* absl_raw_logging_internal_filename = __FILE__; \ constexpr const char* absl_raw_log_internal_filename = __FILE__; \
::absl::raw_logging_internal::internal_log_function( \ ::absl::raw_log_internal::internal_log_function( \
ABSL_RAW_LOGGING_INTERNAL_##severity, \ ABSL_RAW_LOG_INTERNAL_##severity, absl_raw_log_internal_filename, \
absl_raw_logging_internal_filename, __LINE__, message); \ __LINE__, message); \
if (ABSL_RAW_LOGGING_INTERNAL_##severity == ::absl::LogSeverity::kFatal) \ if (ABSL_RAW_LOG_INTERNAL_##severity == ::absl::LogSeverity::kFatal) \
ABSL_INTERNAL_UNREACHABLE; \ ABSL_INTERNAL_UNREACHABLE; \
} while (0) } while (0)
...@@ -91,16 +90,16 @@ ...@@ -91,16 +90,16 @@
} \ } \
} while (0) } while (0)
#define ABSL_RAW_LOGGING_INTERNAL_INFO ::absl::LogSeverity::kInfo #define ABSL_RAW_LOG_INTERNAL_INFO ::absl::LogSeverity::kInfo
#define ABSL_RAW_LOGGING_INTERNAL_WARNING ::absl::LogSeverity::kWarning #define ABSL_RAW_LOG_INTERNAL_WARNING ::absl::LogSeverity::kWarning
#define ABSL_RAW_LOGGING_INTERNAL_ERROR ::absl::LogSeverity::kError #define ABSL_RAW_LOG_INTERNAL_ERROR ::absl::LogSeverity::kError
#define ABSL_RAW_LOGGING_INTERNAL_FATAL ::absl::LogSeverity::kFatal #define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
#define ABSL_RAW_LOGGING_INTERNAL_LEVEL(severity) \ #define ABSL_RAW_LOG_INTERNAL_LEVEL(severity) \
::absl::NormalizeLogSeverity(severity) ::absl::NormalizeLogSeverity(severity)
namespace absl { namespace absl {
ABSL_NAMESPACE_BEGIN ABSL_NAMESPACE_BEGIN
namespace raw_logging_internal { namespace raw_log_internal {
// Helper function to implement ABSL_RAW_LOG // Helper function to implement ABSL_RAW_LOG
// Logs format... at "severity" level, reporting it // Logs format... at "severity" level, reporting it
...@@ -130,7 +129,7 @@ constexpr const char* Basename(const char* fname, int offset) { ...@@ -130,7 +129,7 @@ constexpr const char* Basename(const char* fname, int offset) {
// TODO(gfalcon): Come up with a better name for this method. // TODO(gfalcon): Come up with a better name for this method.
bool RawLoggingFullySupported(); 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. // by severity, and for writing custom prefixes on non-suppressed messages.
// //
// The installed hook is called for every raw log invocation. The message will // The installed hook is called for every raw log invocation. The message will
...@@ -139,7 +138,7 @@ bool RawLoggingFullySupported(); ...@@ -139,7 +138,7 @@ bool RawLoggingFullySupported();
// also provided with an output buffer, where it can write a custom log message // also provided with an output buffer, where it can write a custom log message
// prefix. // 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. // hooks must avoid these operations, and must not throw exceptions.
// //
// 'severity' is the severity level of the message being written. // 'severity' is the severity level of the message being written.
...@@ -152,7 +151,7 @@ using LogFilterAndPrefixHook = bool (*)(absl::LogSeverity severity, ...@@ -152,7 +151,7 @@ using LogFilterAndPrefixHook = bool (*)(absl::LogSeverity severity,
const char* file, int line, char** buf, const char* file, int line, char** buf,
int* buf_size); 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 // when a FATAL message is logged. If the provided AbortHook() returns, the
// logging system will call abort(). // logging system will call abort().
// //
...@@ -189,7 +188,7 @@ void RegisterLogFilterAndPrefixHook(LogFilterAndPrefixHook func); ...@@ -189,7 +188,7 @@ void RegisterLogFilterAndPrefixHook(LogFilterAndPrefixHook func);
void RegisterAbortHook(AbortHook func); void RegisterAbortHook(AbortHook func);
void RegisterInternalLogFunction(InternalLogFunction func); void RegisterInternalLogFunction(InternalLogFunction func);
} // namespace raw_logging_internal } // namespace raw_log_internal
ABSL_NAMESPACE_END ABSL_NAMESPACE_END
} // namespace absl } // namespace absl
......
...@@ -218,7 +218,7 @@ static void InstallOneFailureHandler(FailureSignalData* data, ...@@ -218,7 +218,7 @@ static void InstallOneFailureHandler(FailureSignalData* data,
#endif #endif
static void WriteToStderr(const char* data) { 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, static void WriteSignalMessage(int signo, int cpu,
......
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