We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 719285c commit e06ad3eCopy full SHA for e06ad3e
native-activity/app/src/main/cpp/main.cpp
@@ -30,10 +30,13 @@
30
#include <initializer_list>
31
#include <memory>
32
33
-#define LOGI(...) \
34
- ((void)__android_log_print(ANDROID_LOG_INFO, "native-activity", __VA_ARGS__))
35
-#define LOGW(...) \
36
- ((void)__android_log_print(ANDROID_LOG_WARN, "native-activity", __VA_ARGS__))
+#define LOG_TAG "native-activity"
+
+#define _LOG(priority, fmt, ...) \
+ ((void)__android_log_print((priority), (LOG_TAG), (fmt)__VA_OPT__(, ) __VA_ARGS__))
37
38
+#define LOGW(fmt, ...) _LOG(ANDROID_LOG_WARN, (fmt)__VA_OPT__(, ) __VA_ARGS__)
39
+#define LOGI(fmt, ...) _LOG(ANDROID_LOG_INFO, (fmt)__VA_OPT__(, ) __VA_ARGS__)
40
41
/**
42
* Our saved state data.
0 commit comments