Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 06e111a1 authored by Tom Cherry's avatar Tom Cherry
Browse files

Add android_logger_get_log_consumed_size() and report it in logcat

There is an existing API, android_logger_get_log_readable_size() which
historically reported the consumed amount of data for the chatty log
buffer, since consumed and readable are synonymous with that buffer
type.

With log compression, readable and consumed are not synonymous, since
the readable log size is the uncompressed log size whereas the
consumed log size is the compressed log size.

This change adds android_logger_get_log_consumed_size() which returns
the consumed log size and makes android_logger_get_log_readable_size()
return the readable log size.  Note that these values are identical if
compression is not used.

It adds both statistics to logcat:

    main: ring buffer is 1 MiB (429 KiB consumed, 817 KiB readable)
    radio: ring buffer is 1 MiB (339 KiB consumed, 715 KiB readable)
    ...

Test: logcat prints the right values with compression and chatty
Change-Id: I8b9688a987736204e2e6026e8635fbd1a5e68bb7
parent 0d847fb4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment