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
path: root/base
diff options
context:
space:
mode:
authorVladimir Byko-Ianko <v.bykoianko@corp.mail.ru>2015-02-27 20:31:21 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:46:03 +0300
commitc5a45d38c2060c1b8722a387031bef03cabdc9e6 (patch)
treecfbcac93439a272583e96657c5d17caaae8c97b5 /base
parentb6db1697139223354c36524605eb13cbdc2f9f15 (diff)
Developing infrastucture for launching integration tests and unit tests for Android. Porting integration tests and indexer tests on Android platform.
Diffstat (limited to 'base')
-rw-r--r--base/logging.cpp14
-rw-r--r--base/logging.hpp1
2 files changed, 15 insertions, 0 deletions
diff --git a/base/logging.cpp b/base/logging.cpp
index 627f9d0beb..fbf30b9539 100644
--- a/base/logging.cpp
+++ b/base/logging.cpp
@@ -7,10 +7,12 @@
#include "std/iostream.hpp"
#include "std/iomanip.hpp"
+#include "std/mutex.hpp"
#include "std/sstream.hpp"
#include "std/target_os.hpp"
#include "std/windows.hpp"
+
namespace my
{
void LogCheckIfErrorLevel(LogLevel level)
@@ -104,11 +106,23 @@ namespace my
std::cerr << out.str();
+
+ }
+ void LogMessageTests(LogLevel level, SrcPoint const & srcPoint, string const & msg)
+ {
+ static mutex mtx;
+ lock_guard<mutex> lock(mtx);
+
+ ostringstream out;
+ out << msg << endl;
+ std::cerr << out.str();
+
#ifdef OMIM_OS_WINDOWS
OutputDebugStringA(out.str().c_str());
#endif
LogCheckIfErrorLevel(level);
}
+
#endif
LogMessageFn LogMessage = &LogMessageDefault;
diff --git a/base/logging.hpp b/base/logging.hpp
index 765c447ff7..f5b248da8f 100644
--- a/base/logging.hpp
+++ b/base/logging.hpp
@@ -21,6 +21,7 @@ namespace my
/// @return Pointer to previous message function.
LogMessageFn SetLogMessageFn(LogMessageFn fn);
+ void LogMessageTests(LogLevel level, SrcPoint const & srcPoint, string const & msg);
}
using ::my::LDEBUG;