diff options
| -rw-r--r-- | libs/binder/liblog_stub/include/log/log.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libs/binder/liblog_stub/include/log/log.h b/libs/binder/liblog_stub/include/log/log.h index 91c9632c1b..dad0020ace 100644 --- a/libs/binder/liblog_stub/include/log/log.h +++ b/libs/binder/liblog_stub/include/log/log.h @@ -54,16 +54,16 @@ int __android_log_print(int prio, const char* tag, const char* fmt, ...) #define IF_ALOGW() IF_ALOG(LOG_WARN, LOG_TAG) #define IF_ALOGE() IF_ALOG(LOG_ERROR, LOG_TAG) -#define ALOG(priority, tag, fmt, ...) \ - do { \ - if (false)[[/*VERY*/ unlikely]] { /* ignore unused __VA_ARGS__ */ \ - std::fprintf(stderr, fmt __VA_OPT__(, ) __VA_ARGS__); \ - } \ - IF_ALOG(priority, tag) { \ - __android_log_print(ANDROID_##priority, tag, \ - tag ": " fmt "\n" __VA_OPT__(, ) __VA_ARGS__); \ - } \ - if constexpr (ANDROID_##priority == ANDROID_LOG_FATAL) std::abort(); \ +#define ALOG(priority, tag, fmt, ...) \ + do { \ + if (false)[[/*VERY*/ unlikely]] { /* ignore unused __VA_ARGS__ */ \ + std::fprintf(stderr, fmt __VA_OPT__(, ) __VA_ARGS__); \ + } \ + IF_ALOG(priority, tag) { \ + __android_log_print(ANDROID_##priority, tag, "%s: " fmt "\n", \ + (tag)__VA_OPT__(, ) __VA_ARGS__); \ + } \ + if constexpr (ANDROID_##priority == ANDROID_LOG_FATAL) std::abort(); \ } while (false) #define ALOGV(...) ALOG(LOG_VERBOSE, LOG_TAG, __VA_ARGS__) #define ALOGD(...) ALOG(LOG_DEBUG, LOG_TAG, __VA_ARGS__) |