Skip to content

Commit e06ad3e

Browse files
committed
Mild logging cleanup.
1 parent 719285c commit e06ad3e

File tree

1 file changed

+7
-4
lines changed
  • native-activity/app/src/main/cpp

1 file changed

+7
-4
lines changed

native-activity/app/src/main/cpp/main.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,13 @@
3030
#include <initializer_list>
3131
#include <memory>
3232

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__))
33+
#define LOG_TAG "native-activity"
34+
35+
#define _LOG(priority, fmt, ...) \
36+
((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__)
3740

3841
/**
3942
* Our saved state data.

0 commit comments

Comments
 (0)