//
// Created by #Suyghur, on 2021/10/15.
//

#ifndef YYXXCOMMSDK_YYLOG_H
#define YYXXCOMMSDK_YYLOG_H


#include <string>
#include <android/log.h>
#include <jni.h>

#ifdef __cplusplus
extern "C" {
#endif

#define TAG "YYLog"
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,TAG,__VA_ARGS__)
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,TAG,__VA_ARGS__)

class YYLog {

public:

    static bool is_debug;

    static void D(JNIEnv *env, const std::string &msg);

    static void I(JNIEnv *env, const std::string &msg);

    static void E(JNIEnv *env, const std::string &msg);

    static void LogHandler(JNIEnv *env, const std::string &msg);

};

#ifdef __cplusplus
}
#endif

#endif //YYXXCOMMSDK_YYLOG_H
