Add verbosity level to platform log for better integration with Web and Android platforms
This commit is contained in:
@@ -992,11 +992,16 @@ void AndroidPlatform::Exit()
|
||||
|
||||
#if !BUILD_RELEASE
|
||||
|
||||
void AndroidPlatform::Log(const StringView& msg)
|
||||
void AndroidPlatform::Log(const StringView& msg, int32 logType)
|
||||
{
|
||||
const StringAsANSI<512> msgAnsi(*msg, msg.Length());
|
||||
const char* str = msgAnsi.Get();
|
||||
__android_log_write(ANDROID_LOG_INFO, "Flax", str);
|
||||
int prio = ANDROID_LOG_INFO;
|
||||
if (logType == (int32)LogType::Warning)
|
||||
prio = ANDROID_LOG_WARN;
|
||||
if (logType == (int32)LogType::Error)
|
||||
prio = ANDROID_LOG_ERROR;
|
||||
__android_log_write(prio, "Flax", str);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -108,7 +108,7 @@ public:
|
||||
static void BeforeExit();
|
||||
static void Exit();
|
||||
#if !BUILD_RELEASE
|
||||
static void Log(const StringView& msg);
|
||||
static void Log(const StringView& msg, int32 logType = 1);
|
||||
#endif
|
||||
static int32 GetDpi();
|
||||
static NetworkConnectionType GetNetworkConnectionType();
|
||||
|
||||
Reference in New Issue
Block a user