Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Grechuhin <i.grechuhin@gmail.com>2017-06-29 12:30:02 +0300
committerYuri Gorshenin <mipt.vi002@gmail.com>2017-06-29 12:49:37 +0300
commit7ac781d70c965e5e3a66643719a1511e769d71ef (patch)
tree7e26ffa34351d389f763811d8d3d149c04126716
parentfcc1bb8003b99d0ae560c0922b6e96bb91dd65d1 (diff)
[fix] Added NUM_LOG_LEVELS case handling.
-rw-r--r--base/logging.hpp1
-rw-r--r--iphone/Maps/Common/Statistics/fabric_logging_ios.mm3
-rw-r--r--platform/file_logging.cpp1
3 files changed, 5 insertions, 0 deletions
diff --git a/base/logging.hpp b/base/logging.hpp
index 2bbcbd75e8..10fdf9502c 100644
--- a/base/logging.hpp
+++ b/base/logging.hpp
@@ -70,6 +70,7 @@ using ::my::LINFO;
using ::my::LWARNING;
using ::my::LERROR;
using ::my::LCRITICAL;
+using ::my::NUM_LOG_LEVELS;
// Logging macro.
// Example usage: LOG(LINFO, (Calc(), m_Var, "Some string constant"));
diff --git a/iphone/Maps/Common/Statistics/fabric_logging_ios.mm b/iphone/Maps/Common/Statistics/fabric_logging_ios.mm
index 5994651dcc..268b400a8e 100644
--- a/iphone/Maps/Common/Statistics/fabric_logging_ios.mm
+++ b/iphone/Maps/Common/Statistics/fabric_logging_ios.mm
@@ -2,6 +2,8 @@
#include "fabric_logging.hpp"
+#include "base/assert.hpp"
+
namespace platform
{
void LogMessageFabric(my::LogLevel level, my::SrcPoint const & srcPoint, std::string const & msg)
@@ -14,6 +16,7 @@ namespace platform
case LWARNING: recordType.assign("WARN "); break;
case LERROR: recordType.assign("ERROR "); break;
case LCRITICAL: recordType.assign("FATAL "); break;
+ case NUM_LOG_LEVELS: CHECK(false, ()); break;
}
std::string const srcString = recordType + DebugPrint(srcPoint) + " " + msg + "\n";
diff --git a/platform/file_logging.cpp b/platform/file_logging.cpp
index 34b65c220e..04a57f0b0e 100644
--- a/platform/file_logging.cpp
+++ b/platform/file_logging.cpp
@@ -33,6 +33,7 @@ void LogMessageFile(my::LogLevel level, my::SrcPoint const & srcPoint, string co
case LWARNING: recordType.assign("WARN "); break;
case LERROR: recordType.assign("ERROR "); break;
case LCRITICAL: recordType.assign("FATAL "); break;
+ case NUM_LOG_LEVELS: CHECK(false, ()); break;
}
lock_guard<mutex> lock(mtx);