begin packet serialization

This commit is contained in:
2024-07-18 15:28:01 +02:00
parent 2e63a474b8
commit 6e9c747b2d
17 changed files with 842 additions and 0 deletions

35
src/blitz/common/Log.cpp Normal file
View 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