简体   繁体   中英

How to implement debug logs in Android's JNI

I am trying to implement debug logs in the following file in the android code.

frameworks/base/services/jni/com_android_server_BatteryService.cpp

I have tried LOGE and __android_log_write(), however things doesn't work. I have also tried to create a text file in the filesystem and then write it, however this also didnt work.

#define LOG_TAG "BatteryService"
#include "utils/Log.h"

/* some code*/

LOGE("Mine logging is better than yours.");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM