Add verbosity level to platform log for better integration with Web and Android platforms

This commit is contained in:
Wojtek Figat
2026-02-24 20:09:09 +01:00
parent 195d5b1aa2
commit e41ec4ebfd
14 changed files with 32 additions and 20 deletions

View File

@@ -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