I'm sorry, but i read the bug and i am not entirely sure i understood what the request for logcheck is! but if you want to use logcheck to scan apt logs this is already possible.
You just need to add the name of the log to a file in the logfiles.d directory. Your script using sed could be then be replaced by a list of regexps and they would be used by logcheck in its usual run, and matches reported in the usual way. (I do this locally on other log files and it works. One limitation is that logcheck cannot report which line came from which log and i wouldnt see that changing)
If you want to run logcheck totally separately from the periodic check, with different config, so that the reported lines are not mixed up with the normal log entries (eg in an apt hook), this is also possible - you will need to invoke logcheck as the logcheck user and use the relevent command line options. (the autopkgtests do this).
.... But if this is really about having
apt/unattended-uogrades report errors better it would be better to do that change directly in those tools i would suggest
I would also echo the recommendion for using cron-apt which can already send an email (or write a log entry for logcheck to report) if anything went wrong, (or always - apart from cron-apt not yet having a systemd timer it is quite easy to configure and works very well). it seems better to use that existing functionality than to insert logcheck. but perhaps i didnt understand the request.
On Wed, 24 Nov 2021 21:37:36 +0800 Paul Wise wrote:
> I'm currently using the attached hacky script with lots of regexes to
> implement apt upgrade log filtering.
Here is an updated version of the script.
--
bye,
pabs
https://wiki.debian.org/PaulWise