Change to proper Log functions
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
#ifndef MBGL_ANDROID_LOG
|
||||
#define MBGL_ANDROID_LOG
|
||||
|
||||
#include <android/log.h>
|
||||
|
||||
#define S(x) #x
|
||||
#define S_(x) S(x)
|
||||
#define S__LINE__ S_(__LINE__)
|
||||
|
||||
#ifdef DEBUG
|
||||
#define LOG_VERBOSE(fmt, args...) __android_log_print(ANDROID_LOG_VERBOSE, __FILE__ ":" S__LINE__, fmt, ##args)
|
||||
#define LOG_DEBUG(fmt, args...) __android_log_print(ANDROID_LOG_DEBUG, __FILE__ ":" S__LINE__, fmt, ##args)
|
||||
#define LOG_ASSERT(cond, ...) ((cond)?(void)0:__android_log_assert(#cond, __FILE__ ":" S__LINE__, NULL))
|
||||
#define LOG_ASSERTMSG(cond, fmt, args...) ((cond)?(void)0:__android_log_assert(#cond, __FILE__ ":" S__LINE__, fmt, ##args))
|
||||
#else
|
||||
#define LOG_VERBOSE(fmt, args...)
|
||||
#define LOG_DEBUG(fmt, args...)
|
||||
#define LOG_ASSERT(cond, ...)
|
||||
#define LOG_ASSERTMSG(cond, fmt, args...)
|
||||
#endif
|
||||
#define LOG_INFO(fmt, args...) __android_log_print(ANDROID_LOG_INFO, __FILE__ ":" S__LINE__, fmt, ##args)
|
||||
#define LOG_WARN(fmt, args...) __android_log_print(ANDROID_LOG_WARN, __FILE__ ":" S__LINE__, fmt, ##args)
|
||||
#define LOG_ERROR(fmt, args...) __android_log_print(ANDROID_LOG_ERROR, __FILE__ ":" S__LINE__, fmt, ##args)
|
||||
|
||||
#endif
|
||||
@@ -34,6 +34,8 @@ enum class Event : uint8_t {
|
||||
Sprite,
|
||||
Image,
|
||||
OpenGL,
|
||||
JNI,
|
||||
Android
|
||||
};
|
||||
|
||||
MBGL_DEFINE_ENUM_CLASS(EventClass, Event, {
|
||||
@@ -48,6 +50,8 @@ MBGL_DEFINE_ENUM_CLASS(EventClass, Event, {
|
||||
{ Event::Sprite, "Sprite" },
|
||||
{ Event::Image, "Image" },
|
||||
{ Event::OpenGL, "OpenGL" },
|
||||
{ Event::JNI, "JNI" },
|
||||
{ Event::Android, "Android" },
|
||||
{ Event(-1), "Unknown" },
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user