1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00

android logging

This commit is contained in:
Jeff Becker 2018-08-06 14:35:00 +10:00
parent fe489b0280
commit ec6b468b44

View file

@ -11,6 +11,9 @@
#define VC_EXTRALEAN
#include <windows.h>
#endif
#ifdef ANDROID
#include <android/log.h>
#endif
namespace llarp
{
@ -103,9 +106,16 @@ namespace llarp
ss << (char)27 << "[0;0m";
{
std::unique_lock< std::mutex > lock(_glog.access);
#ifdef ANDROID
__android_log_write(ANDROID_LOG_INFO,
"LOKINET"
"%s",
ss.str());
#else
_glog.out << ss.str() << std::endl;
#ifdef SHADOW_TESTNET
_glog.out << "\n" << std::flush;
#endif
#endif
}
}