Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

All great discoveries are made by mistake. -- Young


devel / comp.lang.python / Re: Getting Syslog working on OSX Monterey

SubjectAuthor
o Re: Getting Syslog working on OSX MontereyPeter J. Holzer

1
Re: Getting Syslog working on OSX Monterey

<mailman.173.1646428997.2329.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=17360&group=comp.lang.python#17360

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: hjp-pyt...@hjp.at (Peter J. Holzer)
Newsgroups: comp.lang.python
Subject: Re: Getting Syslog working on OSX Monterey
Date: Fri, 4 Mar 2022 22:23:07 +0100
Lines: 79
Message-ID: <mailman.173.1646428997.2329.python-list@python.org>
References: <CADoNktU6JPX00wDf9asFVr=NpTAy1ruRn_pHnLunc91M9_sokA@mail.gmail.com>
<0D40B574-2975-49BD-9E97-9055317169E5@barrys-emacs.org>
<20220228214109.ntoihdobzf5naqrx@hjp.at>
<4EAF5AC0-446D-4493-AFF0-2FD8A8889439@barrys-emacs.org>
<20220304212307.bd3rj67m6gaej37a@hjp.at>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
protocol="application/pgp-signature"; boundary="2huhrg6svvw3zxuf"
X-Trace: news.uni-berlin.de 4kX2p8RCRbKJGk9bwkMCwAA/b+Ls4l72FDhv0atuVzLA==
Return-Path: <hjp-python@hjp.at>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.000
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '(which': 0.04; 'yet.':
0.04; '(e.g.': 0.05; 'content-type:multipart/signed': 0.05;
'parameter': 0.05; 'content-type:application/pgp-signature': 0.09;
'fedora': 0.09; 'filename:fname piece:asc': 0.09; 'filename:fname
piece:signature': 0.09; 'filename:fname:signature.asc': 0.09;
'linux': 0.09; 'myself.': 0.09; 'reasons:': 0.09; 'import': 0.15;
'"creative': 0.16; '(more': 0.16; '2022,': 0.16; '__/': 0.16;
'api.': 0.16; 'barry': 0.16; 'challenge!"': 0.16; 'constructor':
0.16; 'destination.': 0.16; 'everywhere,': 0.16; 'from:addr:hjp-
python': 0.16; 'from:addr:hjp.at': 0.16; 'from:name:peter j.
holzer': 0.16; 'hjp@hjp.at': 0.16; 'holzer': 0.16; 'reality.':
0.16; 'rewrite': 0.16; 'server,': 0.16; 'stross,': 0.16;
'subject:OSX': 0.16; 'subject:working': 0.16; 'url-
ip:212.17.106.137/32': 0.16; 'url-ip:212.17.106/24': 0.16; 'url-
ip:212.17/16': 0.16; 'url:hjp': 0.16; '|_|_)': 0.16; 'wrote:':
0.16; 'api': 0.17; 'feb': 0.17; 'instead': 0.17; "can't": 0.17;
'uses': 0.19; 'implement': 0.19; 'to:addr:python-list': 0.20;
'written': 0.22; 'mac': 0.22; 'code': 0.23; 'saying': 0.25;
'seems': 0.26; 'configure': 0.26; 'library': 0.26; 'port': 0.26;
'function': 0.27; 'etc': 0.28; 'sense': 0.28; 'default': 0.31;
"doesn't": 0.32; 'but': 0.32; "i'm": 0.33; 'there': 0.33; 'mean':
0.34; 'header:In-Reply-To:1': 0.34; 'missing': 0.37; 'really':
0.37; 'using': 0.37; 'way': 0.38; 'two': 0.39; 'adding': 0.39;
'least': 0.39; 'single': 0.39; 'use': 0.39; 'want': 0.40;
'should': 0.40; 'connection': 0.61; 'likely': 0.61; 'forward':
0.62; 'received:212': 0.62; 'remote': 0.63; 'pass': 0.64; 'look':
0.65; 'received:userid': 0.66; 'deeply': 0.69; 'remaining': 0.69;
'url-ip:212/8': 0.69; 'disagree': 0.84; 'os.': 0.84;
'received:at': 0.84; 'scott': 0.84; 'will,': 0.91
Content-Disposition: inline
In-Reply-To: <4EAF5AC0-446D-4493-AFF0-2FD8A8889439@barrys-emacs.org>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <20220304212307.bd3rj67m6gaej37a@hjp.at>
X-Mailman-Original-References: <CADoNktU6JPX00wDf9asFVr=NpTAy1ruRn_pHnLunc91M9_sokA@mail.gmail.com>
<0D40B574-2975-49BD-9E97-9055317169E5@barrys-emacs.org>
<20220228214109.ntoihdobzf5naqrx@hjp.at>
<4EAF5AC0-446D-4493-AFF0-2FD8A8889439@barrys-emacs.org>
 by: Peter J. Holzer - Fri, 4 Mar 2022 21:23 UTC
Attachments: signature.asc (application/pgp-signature)

On 2022-02-28 22:05:05 +0000, Barry Scott wrote:
> On 28 Feb 2022, at 21:41, Peter J. Holzer <hjp-python@hjp.at> wrote:
> > On 2022-02-27 22:16:54 +0000, Barry wrote:
> >> I have always assumed that if I want a logger syslog handler that I would have
> >> to implement it myself. So far I have code that uses syslog directly and have
> >> not written that code yet.
> >
> > What do you mean by using syslog directly? The syslog(3) library
> > function also just sends messages to a "syslog listener" (more commonly
> > called a syslog daemon) - at least on any unix-like system I'm familiar
> > with (which doesn't include MacOS). It will, however, always use the
> > *local* syslog daemon - AFAIK there is no standard way to open a remote
> > connection (many syslog daemons can be configured to forward messages to
> > a remote server, however).
>
> I'm re-reading the code to check on what I'm seeing. (Its been a long
> time since I last look deeply at this code).
>
> You can write to /dev/log if you pass that to
> SysLogHandler(address='/dev/log'), but the default is to use a socket
> to talk to a network listener on localhost:514. There are no deamons
> listening on port 514 on my Fedora systems or mac OS.

If you are saying that SysLogHandler should use a system specific
default (e.g. "/dev/log" on Linux) instead of UDP port 514 everywhere, I
agree 99 % (the remaining 1 % is my contrarian alter ego arguing that
that's really the distribution maintainer's job since a Linux
distribution might use some other socket).

If you are saying it should use the libc syslog routines, I disagree for
at least two reasons: a) they are OS specific, b) you can't configure the
destination. So that would remove useful functionality.

In any case it seems strange to me that you want to rewrite it just to
avoid passing a single parameter to the constructor (or - more likely -
adding a single line to a config file).

> What you do not see used in the SyslogHandler() is the import syslog
> and hence its nor using openlog() etc from syslog API.

For good reasons. The C syslog API is missing important functionality.

hp

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

Attachments: signature.asc (application/pgp-signature)
1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor