美文网首页
在C/C++打印Log

在C/C++打印Log

作者: lixinxin | 来源:发表于2017-11-28 14:12 被阅读22次

include <jni.h>

include <string>

include <iostream>

include <android/log.h>

include <list>

define LOG_TAG "native-lib"

define LOGI(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, VA_ARGS)

define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, VA_ARGS)

define LOGI(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, VA_ARGS)

使用

LOGI("name=%s", name.c_str());
LOGE("name=%s", name.c_str());

image.png

相关文章

网友评论

      本文标题:在C/C++打印Log

      本文链接:https://www.haomeiwen.com/subject/nhasbxtx.html