当前位置: 首页 > news >正文

Android12之logcat日志显示颜色和时间(一百六十七)

简介: CSDN博客专家,专注Android/Linux系统,分享多mic语音方案、音视频、编解码等技术,与大家一起成长!

优质专栏:Audio工程师进阶系列原创干货持续更新中……】🚀
优质专栏:多媒体系统工程师系列原创干货持续更新中……】🚀

人生格言: 人生从来没有捷径,只有行动才是治疗恐惧和懒惰的唯一良药.

更多原创,欢迎关注:Android系统攻城狮

欢迎关注Android系统攻城狮

1.前言

本篇目的:Android12之logcat添加log颜色显示

2.logcat正常显示

adb logcat

11-20 23:58:20.761 21530 21530 I PackageWatchdog: Cancelling state sync, nothing to sync
11-20 23:58:20.761 21530 21563 I PackageWatchdog: Saving observer state to file
11-20 23:58:20.766 21530 21530 V RescueParty: Disabled because of active USB connection
11-20 23:58:20.766 21530 21530 I SystemServerTiming: StartLightsService
11-20 23:58:20.766 21530 21530 I SystemServiceManager: Starting com.android.server.lights.LightsService

3.logcat增加log颜色显示

adb logcat -v tag,color
D/SystemServerTiming: StartLightsService took to complete: 2ms
I/SystemServerTiming: StartSidekickService
D/SystemServerTiming: StartSidekickService took to complete: 0ms
I/SystemServerTiming: StartDisplayManager

4.logcat日志显示时间和颜色

adb logcat -v tag,color,time
11-20 23:32:15.791 I/SystemConfig( 9280): Reading permissions from /vendor/etc/permissions/com.google.hardware.camera.easel_2018.xml
11-20 23:32:15.791 I/SystemConfig( 9280): Reading permissions from /vendor/etc/permissions/android.hardware.audio.pro.xml
11-20 23:32:15.792 I/SystemConfig( 9280): Reading permissions from /vendor/etc/permissions/android.hardware.sensor.accelerometer.xml
11-20 23:32:15.792 I/SystemConfig( 9280): Reading permissions from /vendor/etc/permissions/android.hardware.nfc.hcef.xml
11-20 23:32:15.792 D/CompatConfig( 9280): Adding: com.android.server.compat.config.Change@43fb86e
11-20 23:32:15.792 I/SystemConfig( 9280): Reading permissions from /vendor/etc/permissions/android.hardware.telephony.ims.xml
11-20 23:32:15.792 I/SystemConfig( 9280): Reading permissions from /vendor/etc/permissions/android.hardware.vulkan.version.xml
11-20 23:32:15.793 I/SystemConfig( 9280): Reading permissions from /vendor/etc/permissions/android.hardware.wifi.passpoint.xml

5.logcat日志过滤显示Error

adb logcat *:E
11-19 23:24:13.394 E/NativeTombstoneManager( 2754): Tombstone’s UID (0) not an app, ignoring
11-19 23:25:22.158 F/libc (12645): Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 12645 (opengl_render_n), pid 12645 (opengl_render_n)
11-19 23:25:22.278 F/DEBUG (12648): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
11-19 23:25:22.278 F/DEBUG (12648): Build fingerprint: ‘Android/aosp_blueline/blueline:12/SP1A.210812.016.C1/eng.sybero.20220602.164140:userdebug/test-keys’
11-19 23:25:22.278 F/DEBUG (12648): Revision: ‘MP1.0’
11-19 23:25:22.278 F/DEBUG (12648): ABI: ‘arm64’
11-19 23:25:22.278 F/DEBUG (12648): Timestamp: 2023-11-19 23:25:22.213013780+0800

6.logcat日志过滤显示Warning

11-27 16:13:39.756 W/IorapForwardingService(26002): No service published for: iorapd
11-27 16:13:40.767 W/IorapForwardingService(26002): No service published for: iorapd
11-27 16:13:41.778 W/IorapForwardingService(26002): No service published for: iorapd
11-27 16:13:42.789 W/IorapForwardingService(26002): No service published for: iorapd
11-27 16:13:43.801 W/IorapForwardingService(26002): No service published for: iorapd
11-27 16:13:44.812 W/IorapForwardingService(26002): No service published for: iorapd
11-27 16:13:45.823 W/IorapForwardingService(26002): No service published for: iorapd
11-27 16:13:46.836 W/IorapForwardingService(26002): No service published for: iorapd
11-27 16:13:47.843 W/IorapForwardingService(26002): No service published for: iorapd
11-27 16:13:48.850 W/IorapForwardingService(26002): No service published for: iorapd
11-27 16:13:49.857 W/IorapForwardingService(26002): No service published for: iorapd
11-27 16:13:50.864 W/IorapForwardingService(26002): No service published for: iorapd
11-27 16:13:51.871 W/IorapForwardingService(26002): No service published for: iorapd
11-27 16:13:52.877 W/IorapForwardingService(26002): No service published for: iorapd
11-27 16:13:53.885 W/IorapForwardingService(26002): No service published for: iorapd

7.可以任意过滤

where is a log component tag (or * for all) and priority is:
V Verbose (default for )
D Debug (default for ‘*’)
I Info
W Warn
E Error
F Fatal
S Silent (suppress all output)

http://www.lryc.cn/news/250074.html

相关文章:

  • 【Windows】内网穿透实现hMailServer远程发送邮件
  • 深信服技术认证“SCSA-S”划重点:SQL注入漏洞
  • Leetcode-二叉树oj题
  • 软件磁盘阵列(software RAID)
  • 浏览器安全攻击与防御
  • vue生命周期、工程化开发和脚手架
  • 文件搜索工具HoudahSpot mac中文版特点
  • maven中scope和optional区别
  • 《ChatGPT实操应用大全》探索无限可能
  • 基于helm的方式在k8s集群中部署gitlab - 部署(一)
  • flask web开发学习之初识flask(二)
  • 利用异或、取反、自增bypass_webshell_waf
  • K8s Docker实践三
  • 记录 | pip加速配置
  • HarmonyOS开发—Arkts循环渲染(ForEach)深入运用详解【鸿蒙专栏-16】
  • uniapp挽留提示2.0
  • 电源控制系统架构(PCSA)之系统分区电压域
  • [Linux] 正则表达式及grep和awk
  • ssm+java车辆售后维护系统 springboot汽车保养养护管理系统+jsp
  • HNU练习七 字符串编程题7. 机器人游戏
  • 【Linux】bash 终端指令
  • 基于SpringBoot高校心理教育辅导设计与实现
  • 关于电脑提示vcruntime140_1.dll无法继续执行代码的解决办法
  • 5. 链表
  • OSI七层模型与TCP/IP四层模型的区别(计算机网络)
  • Other--什么是 CGI,FastCGI、asp、jsp
  • sql关联另一个表,update表的值
  • Python基础:JSON保存结构化数据(详解)
  • 抑郁症日常如何调节?
  • hive两张表实现like模糊匹配关联