logcat: fix -D when using filters
`logcat init:E *:F -D` should print only error messages and above from
init and only fatal messages from other tags. It should print a
divider (`--------- switch to kernel` for example) when switching to a
new log buffer and printing a message.
However, currently the `--------- switch to kernel` messages are
printed before using the filters, therefore the output is spammed with
extraneous loops of
--------- switch to kernel
--------- switch to main
--------- switch to kernel
--------- switch to main
...
This change fixes this by printing dividers immediately before
printing a log message.
Test: `logcat init:V CompatConfig:V *:F -D` works correctly
Test: `logcat` works correctly
Change-Id: Icf207a126f4f1ef79acc4a12aaf134493529a8e5
1 file changed