On 2022-03-06 18:28:59 +0100, Peter J. Holzer wrote:
> On 2022-03-05 16:25:38 +0000, Barry Scott wrote:
> > Using the syslog() function means that any platform/distro details are
> > hidden from the user of syslog() and as is the case of macOS it
> > "just works".
> 
> That doesn't seem to be case. Philip Bloom reported in
> <CADoNktVgU9DBdBfc5wJe4vhJcTKrdVQjdeUO8eN=bvtw9g4...@mail.gmail.com>,
> that syslog in Python 3.6 broke in OS X Monterey. So even using
> syslog(3) doesn't seem to be safe across upgrades (no, I don't know
> how Apple managed to break this - as I wrote, I don't use OS X).
> 
> 
> > (I assume, not checked, that the write to the socket does not work
> > because Apple is not implementing the syslog protocol from the RFC).

I noticed that RFC 5424 describes a very different protocol from RFC
3164 and was curious which one SysLogHandler implements.

Surprise: Neither.

It just sends the PRI part and the MSG part. While that neatly sidesteps
the question of which of the two incompatible header formats to use,
it's not a a valid syslog message in either format.

Obviously Linux accepts this format (the timestamp and the hostname are
kind of redundant anyway when you're using a unix socket).

I strongly suspect that the OS X syslog daemon got stricter and now
insists on properly formatted messages.

        hp


-- 
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | h...@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Attachment: signature.asc
Description: PGP signature

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to