Moved logging macros to their own file
This commit is contained in:
23
app/src/main/cpp/logger.h
Normal file
23
app/src/main/cpp/logger.h
Normal file
@ -0,0 +1,23 @@
|
||||
#include <baresip.h>
|
||||
#include <android/log.h>
|
||||
|
||||
#ifndef BARESIP_LOGGER_H
|
||||
#define BARESIP_LOGGER_H
|
||||
|
||||
#define LOGD(...) \
|
||||
if (log_level_get() < LEVEL_INFO) \
|
||||
((void)__android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__))
|
||||
|
||||
#define LOGI(...) \
|
||||
if (log_level_get() < LEVEL_WARN) \
|
||||
((void)__android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__))
|
||||
|
||||
#define LOGW(...) \
|
||||
if (log_level_get() < LEVEL_ERROR) \
|
||||
((void)__android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__))
|
||||
|
||||
#define LOGE(...) \
|
||||
if (log_level_get() <= LEVEL_ERROR) \
|
||||
((void)__android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__))
|
||||
|
||||
#endif //BARESIP_LOGGER_H
|
||||
Reference in New Issue
Block a user