Only write missed AL logs on the first service start 76/240976/7
authorMateusz Majewski <m.majewski2@samsung.com>
Wed, 12 Aug 2020 12:20:06 +0000 (14:20 +0200)
committerMichal Bloch <m.bloch@partner.samsung.com>
Mon, 17 Aug 2020 11:00:50 +0000 (11:00 +0000)
commit76bc7078e6cf7da6becbf28c48c8532268c9acc9
tree16018f832a76eaf80faf799d3620ed59c4f81472
parent0e57ab1d109e48bfd0b7d1d9d364c6261353d361
Only write missed AL logs on the first service start

The AL backend is based on the kernel devices, which may be written to
at any time. dlog_logger used to read the whole contents of the device
on its start, which is the reasonable thing to do (we don't want to miss
any logs) but bad for various reasons (for example, the same logs are
written to the persistent logs file many times when the service is
restarted). This patch makes it so that the device is only read in its
entirety on the first start of the service after reboot; on every other
start, all the logs existing in the device at the moment of the service
start are skipped.

Change-Id: I1eefd62191d66201ca74919d32b27aecbb1f621b
configs/25-logger.conf
configs/dlog-logger.conf.cpu
src/logger/logger.c
src/logger/logger_internal.h
tests/dlog_cpu.in