Linux 上 logcat 的线条颜色 [android]
Eclipse 中的 Logcat 有错误、警告、调试等颜色。
当我在终端中运行命令“adb -e logcat”以使其着色时,如何才能在 Linux (Ubuntu) 上获得相同的结果?
The Logcat in Eclipse has colors for errors, warning, debug, ...
How can I do to get the same result on Linux (Ubuntu) when I run the command 'adb -e logcat' in a terminal to get it colored?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
adb logcat -v color
来自 developer.android.com< /a>
adb logcat -v color
from developer.android.com
带有脚本的链接
我认为这会很有用为您服务,您可以自己更改脚本;)
Link with script
I think it will be useful for you and you can change script by yourself;)
这是我对 logcat“着色”的看法:
https://bitbucket.org/brunobraga/logcat-colorize
This is my view of "colorizing" the logcat:
https://bitbucket.org/brunobraga/logcat-colorize
我最喜欢的是 pidcat,由 Jake Wharton 根据 Jeff Sharkey 的脚本(由 Yaroslav Boichuk 提到)维护。
我还使用了 logcat-color,由 Marshall Culpepper 维护(也基于 Jeff 的脚本)它允许您创建可以激活的配置文件(每个任务或每个应用程序的日志等)。
我更喜欢 pidcat,因为当时 logcat-color 不会按包名称进行过滤,并且一旦它是 添加了。似乎仍然相当受欢迎。
My favourite is pidcat, maintained by Jake Wharton based off of Jeff Sharkey's script (mentioned by Yaroslav Boichuk).
I have also used logcat-color, maintained by Marshall Culpepper, (also based off of Jeff's script) which allows you to create profiles you can activate (log per task, or per application, etc).
I have preferred pidcat because at the time logcat-color wouldn't filter by package name, and I never went back to try again once it was added. Seems to be reasonably popular still as well.
还有另一个脚本:
And yet another script:
如果您使用 Python,PyLogAnalyser 可以对 Linux、Windows 和 Mac(以及 Cygwin)中的所有类型的日志进行过滤、着色和分析。
您可以直接从 PyPI 安装它:
并调用它来打印标准输出的日志(也可以用于文本或 HTML 输出):
文件“Android_logcat_threadtime.conf”包含在模块目录中。因此实际调用可能是:
网站:http://pyloganalysisr.sourceforge.net
If you use Python, PyLogAnalyser can filter, colorize and analyse all type of logs in Linux, Windows and Mac (and Cygwin).
You can install it directly from PyPI:
And call it in order to print the log for the standard output (also, for text or HTML output):
The file 'Android_logcat_threadtime.conf' is included in the module directory. So the actual invocation could be:
Website: http://pyloganalyser.sourceforge.net
尝试一下 lnav ,从 此处
Have a try with lnav , add logcat config from here