Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Air pollution is really making us pay through the nose.


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

SubjectAuthor
o Re: Getting Syslog working on OSX MontereyPhilip Bloom

1
Re: Getting Syslog working on OSX Monterey

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

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: philip.b...@applovin.com (Philip Bloom)
Newsgroups: comp.lang.python
Subject: Re: Getting Syslog working on OSX Monterey
Date: Thu, 3 Mar 2022 11:29:22 -0800
Lines: 157
Message-ID: <mailman.132.1646335775.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>
<CADoNktXBX6B8YLvoh7xOb20+O8O7Gyk4yvoDOE8CXUBFmC=1_g@mail.gmail.com>
<D82E0307-3B57-41F2-A356-D557337A0188@barrys-emacs.org>
<CADoNktVgU9DBdBfc5wJe4vhJcTKrdVQjdeUO8eN=BvTw9g48fw@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Trace: news.uni-berlin.de VZY0I+UsrY6u1tBk4qBrFQK/HBMzoUPXujxrafjIPAeA==
Return-Path: <philip.bloom@applovin.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="1024-bit key; unprotected key"
header.d=applovin.com header.i=@applovin.com header.b=jZlIQbcu;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.000
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '(which': 0.04; 'yet.':
0.04; '2022': 0.05; 'debug': 0.07; 'mar': 0.07; 'modules': 0.07;
'cc:addr:python-list': 0.09; 'fedora': 0.09; 'macos': 0.09;
'myself.': 0.09; 'received:209.85.219': 0.09; 'rfc': 0.09; 'log':
0.12; '&gt;': 0.14; 'cc:no real name:2**0': 0.14; 'import': 0.15;
'url:mailman': 0.15; 'that.': 0.15; '"creative': 0.16; '(more':
0.16; '2022,': 0.16; '__/': 0.16; 'api.': 0.16; 'assuming': 0.16;
'barry': 0.16; 'challenge!"': 0.16; 'command.': 0.16; 'had,':
0.16; 'hjp@hjp.at': 0.16; 'holzer': 0.16; 'indeed': 0.16;
'linkedin]': 0.16; 'logs': 0.16; 'reality.': 0.16; 'replying,':
0.16; 'reproduce': 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;
'\xc2\xa0|\xc2\xa0': 0.16; 'wrote:': 0.16; 'python': 0.16; 'feb':
0.17; 'probably': 0.17; 'uses': 0.19; 'bug': 0.19; 'implement':
0.19; 'thu,': 0.19; 'cc:addr:python.org': 0.20; 'written': 0.22;
'mac': 0.22; 'code': 0.23; 'cc:2**1': 0.23; 'run': 0.23; 'list,':
0.24; 'url-ip:188.166.95.178/32': 0.25; 'url-ip:188.166.95/24':
0.25; 'depends': 0.25; 'url:listinfo': 0.25; 'url-ip:188.166/16':
0.25; 'feedback.': 0.26; 'library': 0.26; 'port': 0.26; 'suspect':
0.26; 'else': 0.27; 'local': 0.27; 'bit': 0.27; 'function': 0.27;
'etc': 0.28; 'expect': 0.28; 'output': 0.28; 'sense': 0.28;
'suggest': 0.28; 'wrong': 0.28; 'this?': 0.29; 'default': 0.31;
'url-ip:188/8': 0.31; 'program': 0.31; "doesn't": 0.32; 'guess':
0.32; 'message-id:@mail.gmail.com': 0.32; 'but': 0.32; "i'm":
0.33; 'there': 0.33; 'same': 0.34; 'mean': 0.34; 'work.': 0.34;
'header:In-Reply-To:1': 0.34; 'received:google.com': 0.34;
'running': 0.34; 'definitely': 0.35; 'fine': 0.35; "we're": 0.35;
'mon,': 0.36; "skip:' 10": 0.37; 'using': 0.37; 'received:209.85':
0.37; 'engineering': 0.37; 'url-ip:13.107/16': 0.38; 'way': 0.38;
'thanks': 0.38; 'received:209': 0.39; 'changes': 0.39; 'quite':
0.39; 'added': 0.39; 'least': 0.39; 'handle': 0.39; 'use': 0.39;
'seeing': 0.39; 'services': 0.61; 'connection': 0.61; 'here.':
0.61; 'skip:\xc2 10': 0.62; 'forward': 0.62; 'remote': 0.63;
'skip:b 10': 0.63; 'pass': 0.64; 'apple': 0.64; 'your': 0.64;
'produce': 0.65; 'url:instagram': 0.65; 'look': 0.65; 'years':
0.65; 'url:png': 0.66; '8bit%:7': 0.67; 'shows': 0.67; 'live':
0.68; 'know.': 0.68; 'deeply': 0.69; 'skip:/ 10': 0.69; 'url-
ip:212/8': 0.69; 'url-ip:lookup error': 0.70; '8bit%:6': 0.71;
'8bit%:31': 0.73; 'skip:f 20': 0.75; 'experts': 0.76; 'ages':
0.84; 'facebook]': 0.84; 'os.': 0.84; 'scott': 0.84; 'stone':
0.84; 'work.\xc2\xa0': 0.84; 'wherever': 0.91; 'will,': 0.91
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=applovin.com; s=google;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to
:cc; bh=8220Uaf7cyCTIwNjLi6yb1IE9O2Cd5on40umnP8Ym94=;
b=jZlIQbcuIm4GYU/isUU2yq739UB9Eu/zjMyyuYD+Sp+qgd5A0VfjFnwzbd9x/ykP8X
KPgHjaItbV9/qoF2BIpRCkjeseS4gXK2rwlkKDNqoU4ic/r9tcr+oB3Gnt+PH63yVpp9
WTIkR9jV+cIKnOVQ6Yp1gXC6WQAYTAiThcPmg=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to:cc;
bh=8220Uaf7cyCTIwNjLi6yb1IE9O2Cd5on40umnP8Ym94=;
b=IEH/yA7U4vHjtCsIlkcDMoNfwEDO7xTjE/W0g8QmWikrpcUHn1VCAgNuNhchNt2woA
e5WSlNNMouTauUpPLT/w+fkAE9aam1IwAsHb6zzuybk5rvHrCsenmvXwBRvq2KaoWDK/
B47tCBrDH4GZulXyALv7MsJdcIMXiZrT7qL4tRMGul3lLKPJTC80/uXZt74Z8STsKice
Vpl1f5AfsT3Dgx0fZcSUFJ2KiYTCPO7R2QU02aFue/x1fjVJZYi48RAhrew1UPkHw1vn
uOefFttm4ywhMpJxZh8BCPU6W7Kj5u4LeNNA6p8+QEXMCz59xjheic1Jshpn2YGASJ1K
juvA==
X-Gm-Message-State: AOAM531pf0K0yMHgXXyV478akyZMuMbgA/zt5wDZcmhXVZnbwka4mwjm
P3+a20sHSB+rB/GR3TVuqPPVIKfR+QZo9Pp1cATHxg==
X-Google-Smtp-Source: ABdhPJw84kkp4xErHOL9YGhq0Be9JY2nWh66FtqGpaTeK7KiSXVCBfGaLKpou0vjpSk0h+YiICrWEB+rxj3/TdTPFH4=
X-Received: by 2002:a25:6612:0:b0:628:ab58:578b with SMTP id
a18-20020a256612000000b00628ab58578bmr7513068ybc.343.1646335773056; Thu, 03
Mar 2022 11:29:33 -0800 (PST)
In-Reply-To: <D82E0307-3B57-41F2-A356-D557337A0188@barrys-emacs.org>
X-Content-Filtered-By: Mailman/MimeDel 2.1.39
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: <CADoNktVgU9DBdBfc5wJe4vhJcTKrdVQjdeUO8eN=BvTw9g48fw@mail.gmail.com>
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>
<CADoNktXBX6B8YLvoh7xOb20+O8O7Gyk4yvoDOE8CXUBFmC=1_g@mail.gmail.com>
<D82E0307-3B57-41F2-A356-D557337A0188@barrys-emacs.org>
 by: Philip Bloom - Thu, 3 Mar 2022 19:29 UTC

Grabbing latest python that does work. Good we're about to get out of the
stone ages a bit here.

So findings:
Syslog - works in 3.10, broken against monterey in 3.6.
Logging.Handlers.Sysloghandler - is broken in both against Monterey.

Will bug it for the tracker. Thanks for the feedback.

On Thu, Mar 3, 2022 at 10:32 AM Barry Scott <barry@barrys-emacs.org> wrote:

>
>
> On 3 Mar 2022, at 03:01, Philip Bloom <philip.bloom@applovin.com> wrote:
>
> I'm probably asking on the wrong list, and probably should bother wherever
> apple's ASL experts live for changes in monterey. Guess nobody else is
> seeing this?
>
> The same exact code is working just fine on OSX Big Sur, but on OSX
> Monterey it doesn't work at all. Users that haven't updated are having the
> program produce logs as it has for years through
> logging.handlers.SysLogHandler. Mac OSX definitely has a listening socket
> at '/var/run/syslog' which shows up in Console.app.
>
> Apologies, Barry. I'm not quite understanding your responses.
>
>
> This works:
>
> syslog.openlog(logoption=syslog.LOG_PID, facility=syslog.LOG_USER)
> syslog.syslog(syslog.LOG_NOTICE, 'QQQ test log')
>
> I see the "QQQ test log" when I run syslog command.
>
> And I can reproduce that logging.handlers.SysLogHandler does not work.
> I added debug to the SysLogHandler() code and see that it does indeed
> write into the /var/run/syslog socket.
> I suspect that macOS /var/run/syslog does not implement the RFC that this
> code depends on, but that a wild guess.
>
> I suggest that you write your own handler that uses syslog.syslog() and
> use that.
>
> Barry
>
>
> When we say OSX has no listener for Syslog, what is the Apple System Log
> and the general output to Console.app then? I thought that was the local
> syslog on OSX and had, for years, been behaving as such when using
> logging.handlers.SysLogHandler with a config in /etc/asl/ to define how it
> should be routed and the rollover/cleanup frequency.
>
> Thanks for replying, just having trouble understanding.
>
>
> On Mon, Feb 28, 2022 at 2:07 PM Barry Scott <barry@barrys-emacs.org>
> 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:
>> >> If you look at the code of the logging modules syslog handle you will
>> see that
>> >> it does not use syslog. It’s assuming that it can network to a syslog
>> listener.
>> >> Such a listener is not running on my systems as far as I know.
>> >>
>> >> 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.
>>
>> That is not what you would expect as the default if you are using the C
>> API.
>>
>> What you do not see used in the SyslogHandler() is the import syslog
>> and hence its nor using openlog() etc from syslog API.
>>
>> Barry
>>
>>
>>
>> > hp
>> >
>> > --
>> > _ | Peter J. Holzer | Story must make more sense than reality.
>> > |_|_) | |
>> > | | | hjp@hjp.at | -- Charles Stross, "Creative writing
>> > __/ | http://www.hjp.at/ | challenge!"
>> > --
>> > https://mail.python.org/mailman/listinfo/python-list
>>
>> --
>> https://mail.python.org/mailman/listinfo/python-list
>>
>
>
> --
> Philip Bloom
> Director, Services Engineering
> *AppLovin Corporation*
> M: (786)-338-1439 <786-338-1439>
> [image: LinkedIn] <https://www.linkedin.com/company/applovin> [image:
> Twitter] <https://twitter.com/AppLovin> [image: Facebook]
> <https://facebook.com/AppLovin> [image: Instagram]
> <https://www.instagram.com/applovin/>
> [image: AppLovin] <https://www.applovin.com/>
>
>
>
>
>
>

--
Philip Bloom
Director, Services Engineering
*AppLovin Corporation*
M: (786)-338-1439 <786-338-1439>
[image: LinkedIn] <https://www.linkedin.com/company/applovin> [image:
Twitter] <https://twitter.com/AppLovin> [image: Facebook]
<https://facebook.com/AppLovin> [image: Instagram]
<https://www.instagram.com/applovin/>
[image: AppLovin] <https://www.applovin.com/>

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor