Skip to content

Commit

Permalink
Mild logging cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
DanAlbert committed May 1, 2024
1 parent 719285c commit e06ad3e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions native-activity/app/src/main/cpp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,13 @@
#include <initializer_list>
#include <memory>

#define LOGI(...) \
((void)__android_log_print(ANDROID_LOG_INFO, "native-activity", __VA_ARGS__))
#define LOGW(...) \
((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__))

#define LOGW(fmt, ...) _LOG(ANDROID_LOG_WARN, (fmt)__VA_OPT__(, ) __VA_ARGS__)
#define LOGI(fmt, ...) _LOG(ANDROID_LOG_INFO, (fmt)__VA_OPT__(, ) __VA_ARGS__)

/**
* Our saved state data.
Expand Down

0 comments on commit e06ad3e

Please sign in to comment.