Locale for strerror messages
eagle at eyrie.org
Mon Feb 4 16:58:08 UTC 2019
Julien ÉLIE <julien at trigofacile.com> writes:
> Curiously, nnrpd sometimes logs errors in English and sometimes in my
> French locale. For instance:
> news.notice.10.gz:Jan 25 21:37:00 news nnrpd: 176-152-52-76.abo.bbox.fr can't read: Connection reset by peer
> news.notice.10.gz:Jan 25 21:50:39 news nnrpd: 176-152-52-76.abo.bbox.fr can't read: Connexion ré-initialisée par le correspondant
> innreport matches against "/(\S+) can\'t read: Connection reset by
> peer$/o" so translated messages are not taken into account, and are
> reported as unknown. Does someone know what should be done for that?
> Is the best practice to force English for messages?
strerror() will honor locale, so if nnrpd is started with LC_* or LANG
environment variables, you'll get that behavior. (I'm not sure why the
environment variables would be inconsistent in different invocations.)
It probably makes sense to remove locale environment variables when
starting innd, since we make no attempt to localize the rest of INN and
mixed-language error messages are probably more confusing than having them
entirely in English.
Russ Allbery (eagle at eyrie.org) <http://www.eyrie.org/~eagle/>
Please send questions to the list rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
More information about the inn-workers