summaryrefslogtreecommitdiffstats
path: root/base/logging.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'base/logging.cpp')
-rw-r--r--base/logging.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/base/logging.cpp b/base/logging.cpp
index 77a0a43c3..2ca224650 100644
--- a/base/logging.cpp
+++ b/base/logging.cpp
@@ -390,6 +390,11 @@ LogMessage::LogMessage(const char* file, unsigned int line, LogId id,
}
LogMessage::~LogMessage() {
+ // Check severity again. This is duplicate work wrt/ LOG macros, but not LOG_STREAM.
+ if (!WOULD_LOG_SEVERITY(data_->GetSeverity())) {
+ return;
+ }
+
// Finish constructing the message.
if (data_->GetError() != -1) {
data_->GetBuffer() << ": " << strerror(data_->GetError());