同时考虑logcat的和内核日志 [英] Taking logcat and kernel logs simultaneously
问题描述
我试图通过采取以下命令日志(logcat的和kmsg)
I am trying to take logs (logcat and kmsg) via the following command
的logcat -v时间-f的/ dev / kmsg |执行cat / proc /
"logcat -v time -f /dev/kmsg | cat /proc/"
不过我不知道,这里的日志文件存储,什么将是它的名字。
如何识别它
However I am not sure, where the log file is stored, and what will be its name. How do I identify it
推荐答案
OK,这里有一个快速谷歌搜索的结果:
OK, here are the results of a quick Google search:
- Android Logging System
- How to get kernel messages from Android?
我从那些链接了什么是:
What I got from those links are:
- 您的命令的最后一部分,实际上应该是
执行cat / proc / kmsg
-
的logcat -v时间-f的/ dev / kmsg
写的logcat输出到内核消息缓冲区
- The last part of your command should actually be
cat /proc/kmsg
logcat -v time -f /dev/kmsg
writes logcat outputs to kernel message buffer
因此,
logcat -v time -f /dev/kmsg | cat /proc/kmsg
将输出都logcat的和内核日志标准输出
(不管它是什么)。也许,你可以如下输出写入到文件中:
will output both logcat and kernel logs to stdout
(whatever it is). Probably, you may write the output to a file as follows:
logcat -v time -f /dev/kmsg | cat /proc/kmsg > /sdcard/log.txt
以上摘自亚行外壳
提示符下一个根深蒂固的Android 4.4.2设备上。
The above worked from adb shell
prompt on a rooted Android 4.4.2 device.
希望这有助于。
这篇关于同时考虑logcat的和内核日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!