On Sun, 25 Jun 2023, 15:09 Ludovic Rousseau, <rouss...@debian.org> wrote:
> > It looks like journalctl now displays the month using the configured > locale. > > Compare: > # journalctl -t smartd -S "Jun 25 10:00:00" > juin 25 11:09:27 zotac smartd[548]: Device: /dev/sda [SAT], SMART Usage > Attribu> > juin 25 13:39:27 zotac smartd[548]: Device: /dev/sda [SAT], SMART Usage > Attribu> > > with: > # LANG=C journalctl -t smartd -S "Jun 25 10:00:00" > Jun 25 11:09:27 zotac smartd[548]: Device: /dev/sda [SAT], SMART Usage > Attribut> > Jun 25 13:39:27 zotac smartd[548]: Device: /dev/sda [SAT], SMART Usage > Attribut > > Thanks for the report and patch. The patch sets LANG to C before running logcheck: i can see this is a solution that will work in the short-term. I think it should be C.UTF-8 instead of plain C? I suspect it would also work to simply write LANG=C into /etc/logcheck/logcheck.conf (untested) In the long-term: - I wonder if locale is something we should allow the user to customize anyway? - what if rsyslog starts doing something similar? we cant change its locale as we work after it has written the log. - hardcoding locale means you wont be able to manually match things logcheck reports to what you see when running journalctl by hand, unless you know to.manually change the locale.... i dont see a way round this :( But we should document that locale is fixed for journalctl (but not for rsyslog!), and make the autopkgtests use a non-english locale as well to help spot future issues.