aboutsummaryrefslogtreecommitdiff
path: root/src/common/logging/backend.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-08-05 11:59:06 -0400
committerbunnei <bunneidev@gmail.com>2015-08-05 11:59:06 -0400
commit983c93be944166af0a3402f6ebb11616669bf3ef (patch)
tree509244f0525c8b1a304134d7c33a631cec0f95d3 /src/common/logging/backend.cpp
parentbd6131bdc02aef73214cf5dd5c7f5e1ee705f79a (diff)
parent2a886560e8cfd46055ed1fbfe911b39c52c82d29 (diff)
Merge pull request #1018 from bbarenblat/master
Handle invalid `Log::Level::Count`
Diffstat (limited to 'src/common/logging/backend.cpp')
-rw-r--r--src/common/logging/backend.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp
index d85e583737..0a081e7d47 100644
--- a/src/common/logging/backend.cpp
+++ b/src/common/logging/backend.cpp
@@ -6,6 +6,7 @@
#include <array>
#include <cstdio>
+#include "common/assert.h"
#include "common/common_funcs.h" // snprintf compatibility define
#include "common/logging/backend.h"
#include "common/logging/filter.h"
@@ -78,8 +79,9 @@ const char* GetLevelName(Level log_level) {
LVL(Warning);
LVL(Error);
LVL(Critical);
+ case Level::Count:
+ UNREACHABLE();
}
- return "Unknown";
#undef LVL
}