Send inn-workers mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.isc.org/mailman/listinfo/inn-workers
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of inn-workers digest..."


Today's Topics:

   1. Locale for strerror messages (Julien ?LIE)
   2. Re: Locale for strerror messages (Russ Allbery)


----------------------------------------------------------------------

Message: 1
Date: Mon, 4 Feb 2019 15:38:38 +0100
From: Julien ?LIE <[email protected]>
To: "[email protected]" <[email protected]>
Subject: Locale for strerror messages
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8

Hi,

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[21739]: 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[24810]: 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?

We use strerror() and not strerror_l() in our logging system.  I don't 
understand why error messages sometimes show in French...

-- 
Julien ?LIE

??Ne vous affligez pas de ce que les hommes ne vous connaissent pas?;
  affligez-vous de ne pas conna?tre les hommes.?? (Confucius)


------------------------------

Message: 2
Date: Mon, 04 Feb 2019 08:58:08 -0800
From: Russ Allbery <[email protected]>
To: [email protected]
Subject: Re: Locale for strerror messages
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8

Julien ?LIE <[email protected]> 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[21739]: 
> 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[24810]: 
> 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 ([email protected])              <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.


------------------------------

Subject: Digest Footer

_______________________________________________
inn-workers mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/inn-workers


------------------------------

End of inn-workers Digest, Vol 112, Issue 1
*******************************************

Reply via email to