mirror of
https://github.com/oxen-io/lokinet
synced 2023-12-14 06:53:00 +01:00
android logging
This commit is contained in:
parent
fe489b0280
commit
ec6b468b44
1 changed files with 10 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue