mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-03 23:15:52 +00:00
android logging
This commit is contained in:
parent
fe489b0280
commit
ec6b468b44
@ -11,6 +11,9 @@
|
|||||||
#define VC_EXTRALEAN
|
#define VC_EXTRALEAN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef ANDROID
|
||||||
|
#include <android/log.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace llarp
|
namespace llarp
|
||||||
{
|
{
|
||||||
@ -103,9 +106,16 @@ namespace llarp
|
|||||||
ss << (char)27 << "[0;0m";
|
ss << (char)27 << "[0;0m";
|
||||||
{
|
{
|
||||||
std::unique_lock< std::mutex > lock(_glog.access);
|
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;
|
_glog.out << ss.str() << std::endl;
|
||||||
#ifdef SHADOW_TESTNET
|
#ifdef SHADOW_TESTNET
|
||||||
_glog.out << "\n" << std::flush;
|
_glog.out << "\n" << std::flush;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user