如何打印在Android框架日志消息 [英] How to print log messages with in Android framework
问题描述
我要打印日志中核Android框架文件的消息。例如,我想在在
。我试过 MediaRecorderClient.cpp
日志消息框架\基地\媒体\ libmediaplayerservice \ LOGV
, LOGE
, LOGD
,的printf
和 __ android_log_print
,没有成功。
I am trying to print log messages within core Android framework files. For example, I tried logging messages within MediaRecorderClient.cpp
under frameworks\base\media\libmediaplayerservice\
. I've tried LOGV
, LOGE
, LOGD
, printf
, and __android_log_print
, without any success.
哪个命令我应该用它来打印日志信息?
Which command should I use to print log messages?
推荐答案
日志应该被使用,但它会打印到LogCat中没有系统打印。
Log should be used, but it will print to logcat not system print.
例如:
Log.d("filter", example text); // filter is any tag you want to use as filter
您可以在日食从窗口出现在视图中打开的logcat - >其他 - >机器人 - > logcat的
You can open logcat in eclipse from window-show view -> other -> android -> logcat
这篇关于如何打印在Android框架日志消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!