begin packet serialization
This commit is contained in:
35
src/blitz/common/Log.cpp
Normal file
35
src/blitz/common/Log.cpp
Normal file
@@ -0,0 +1,35 @@
|
||||
#include <blitz/common/Log.h>
|
||||
|
||||
|
||||
|
||||
#ifdef BLITZ_ANDROID_LOGGING
|
||||
#include <android/log.h>
|
||||
#else
|
||||
#include <iostream>
|
||||
#endif
|
||||
|
||||
namespace blitz {
|
||||
|
||||
void Log(const std::string& msg) {
|
||||
#ifdef BLITZ_ANDROID_LOGGING
|
||||
__android_log_print(ANDROID_LOG_INFO, "TRACKERS", "%s", msg.c_str());
|
||||
#else
|
||||
std::cout << msg << "\n";
|
||||
#endif
|
||||
}
|
||||
|
||||
void LogD(const std::string& msg) {
|
||||
#if !defined(NDEBUG)
|
||||
Log(msg);
|
||||
#endif
|
||||
}
|
||||
|
||||
void LogE(const std::string& err) {
|
||||
#ifdef BLITZ_ANDROID_LOGGING
|
||||
__android_log_print(ANDROID_LOG_ERROR, "TRACKERS", "%s", err.c_str());
|
||||
#else
|
||||
std::cerr << err << "\n";
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace blitz
|
||||
Reference in New Issue
Block a user