diff options
author | Marek Gilbert <mcg@google.com> | 2018-04-15 16:10:47 -0700 |
---|---|---|
committer | Marek Gilbert <mcg@google.com> | 2018-04-15 16:45:50 -0700 |
commit | dfb5c04cf87fdff3c7fc16f9de3a2e8e1f4df265 (patch) | |
tree | d82fcc92ef0ba74169ae7d889a5e17c0541b262f /Firestore/third_party/abseil-cpp/absl/base/log_severity.h | |
parent | c1061b7362471ddb7cae26c430f8112b0b94bb83 (diff) |
Update abseil-cpp to a new upstream
Actually update to bf7fc9986e20f664958fc227547fd8d2fdcf863e
Change #754 didn't completely do this.
This makes the rest of the sources match optional, which was imported at
this change in #1083.
Also add:
absl/types/optional_test.cc
absl/types/CMakeLists.txt
absl/utility/CMakeLists.txt
Diffstat (limited to 'Firestore/third_party/abseil-cpp/absl/base/log_severity.h')
-rw-r--r-- | Firestore/third_party/abseil-cpp/absl/base/log_severity.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Firestore/third_party/abseil-cpp/absl/base/log_severity.h b/Firestore/third_party/abseil-cpp/absl/base/log_severity.h index e146bcb..e2931c3 100644 --- a/Firestore/third_party/abseil-cpp/absl/base/log_severity.h +++ b/Firestore/third_party/abseil-cpp/absl/base/log_severity.h @@ -22,6 +22,9 @@ namespace absl { +// Four severity levels are defined. Logging APIs should terminate the program +// when a message is logged at severity `kFatal`; the other levels have no +// special semantics. enum class LogSeverity : int { kInfo = 0, kWarning = 1, @@ -36,6 +39,8 @@ constexpr std::array<absl::LogSeverity, 4> LogSeverities() { absl::LogSeverity::kError, absl::LogSeverity::kFatal}}; } +// Returns the all-caps std::string representation (e.g. "INFO") of the specified +// severity level if it is one of the normal levels and "UNKNOWN" otherwise. constexpr const char* LogSeverityName(absl::LogSeverity s) { return s == absl::LogSeverity::kInfo ? "INFO" @@ -46,7 +51,8 @@ constexpr const char* LogSeverityName(absl::LogSeverity s) { : s == absl::LogSeverity::kFatal ? "FATAL" : "UNKNOWN"; } -// Note that out-of-range severities normalize to kInfo or kError, never kFatal. +// Values less than `kInfo` normalize to `kInfo`; values greater than `kFatal` +// normalize to `kError` (**NOT** `kFatal`). constexpr absl::LogSeverity NormalizeLogSeverity(absl::LogSeverity s) { return s < absl::LogSeverity::kInfo ? absl::LogSeverity::kInfo |