赞
踩
一、在程序中添加
1.java部分
frameworks/base/core/java/android/util/Log.java
frameworks/base/core/jni/android_util_Log.cpp
system/core/liblog/logd_write.c
2.C++部分
system/core/liblog/logd_write.c
二、logcat调试命令
system/core/logcat/logcat.cpp
system/core/liblog/log_read.c
三、内核实现
Kernel3.10.40/drivers/staging/android/logger.c
对应不同打印级别的设备节点:
<span style="font-size:14px;">shell@pitaya:/dev/log $ ls -l
crw-rw-rw- root log 10, 58 2007-01-01 20:00 events
crw-rw-rw- root log 10, 59 2007-01-01 20:00 main
crw-rw-rw- root log 10, 57 2007-01-01 20:00 radio
crw-rw-rw- root log 10, 56 2007-01-01 20:00 system</span>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。