What log source is used by logcat (with default settings: adb shell logcat
). Are dmesg logs included in logcat's output? If not, what's the difference between dmesg logs and logcat logs?
According to the source code https://github.com/android/platform_system_core/blob/master/liblog/logd_write.c Log.d(String tag, String message)
writes directly to /dev/log/main
.
You can write there like this adb shell echo "Hello world" >> /dev/log/main
But dmesg
prints the contents of the kernel's ring buffer. So dmesg
will print only what system writes to kernel log, logcat
will output only android app's logs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With