当前位置:网站首页>AOSP ~ logcat persistence
AOSP ~ logcat persistence
2022-06-29 13:16:00 【Nanke is cute】
I found an option to store logs: Settings -> System -> Advanced -> Developer options -> Store logger data persistently on device
Store logger data persistently on device: Select the type of log messages you want to store persistently on the device. Options are off, all, all but radio, or kernel only.
logd is the logging daemon on Android which mainly covers the functionality of its desktop counterpart syslogd, but also includes klogd and partially auditd to get logs from SELinux subsystem of kernel. However logd just reads from different memory buffers (in RAM) and doesn’t save to persistent memory (files) by default. We can use commandline tools logcat and log to read/write from/to logd respectively. Read here more about memory buffers - main, system, radio, events, and crash.
If one needs persistent logs as files, a separate sub-service (available on userdebug and eng builds only since Oreo (1)) named logcatd (logcat daemon which itself reads from logd) can save them to filesystem in /data/misc/logd/ (not accessible without root). Behavior of the service on boot is controlled by properties logd.logpersistd.enable and persist.logd.logpersistd (2). Or to manually start/stop the service shell scripts /system/bin/logpersist.[start|stop] can be used.
The option “Store logger data persistently on device” in “Developer Options” also controls the same service using property persist.logd.logpersistd.buffer. From official documentation:
Store logger data persistently on device: Select the type of log messages you want to store persistently on the device. Options are off, all, all but radio, or kernel only.
Reference resources : https://elinux.org/Android_Logging_System
边栏推荐
猜你喜欢

C#二叉树结构定义、添加节点值

File contained log poisoning (user agent)

Hystrix circuit breaker

Cvpr2022 𞓜 future transformer with long-term action expectation

Lm07 - detailed discussion on cross section strategy of futures

C binary tree structure definition and node value addition

Leetcode game 299

SCHIEDERWERK電源維修SMPS12/50 PFC3800解析

Tutorial on building pytoch model from zero (V) writing training process -- some basic configurations

Comparison table of LR and Cr button batteries
随机推荐
CVPR2022 | 重新审视池化:你的感受野不是最理想的
@Table爆红
C # indexe l'arbre binaire en traversant l'ordre moyen
AES-128-CBC-Pkcs7Padding加密PHP实例
C#实现二叉排序树定义、插入、构造
netdata邮件告警配置
ArcGIS中对面状河流进行等距分段【渐变赋色、污染物扩散】
如何统计项目代码(比如微信小程序等等)
Acwing 234 abandoning testing
asp.net 项目使用aspnet_compiler.exe发布
Proteus Software beginner notes
Don't build the wheel again. It is recommended to use Google guava open source tool class library. It is really powerful!
Cvpr2022 𞓜 future transformer with long-term action expectation
The role of each part of Neural Network & thoroughly understand neural network
Leetcode game 299
23、 1-bit data storage (delay line / core /dram/sram/ tape / disk / optical disc /flash SSD)
Hutool tool class learning (continuous update)
[Junzheng T31] decompression and packaging of read-only rootfs file system squashfs
Schiederwerk Power Supply repair smps12 / 50 pfc3800 Analysis
记一次固态更新与系统迁移debug的过程