On Thu, 22 Sept 2022 at 23:46, Richard Moseley
wrote:
>
> According to documentation syslog.setlogmask returns the current mask so
> save the value to reset later on.
>
> Oldval = syslog.setlogmask(newmask)
>
> This sets oldval to original mask.
This on its own suggests an odd technique that shou
On Thu, 22 Sep 2022 13:28:57 +, c.bu...@posteo.jp declaimed the
following:
>I would like to get the current `LOG_MASK`, which is kind of a logging
>level. According to the docu it seems that `syslog` doesn't have a
>mechanism for that.
>
There is a function .
> I'm aware that there is a `logging` package that is more _modern_ then
> [`syslog`](https://docs.python.org/3/library/syslog.html). But I have
> old code here to deal with that does use `syslog`. So that question is
> specific to `syslog` and not to `logging`.
>
> I woul
X-Post: https://stackoverflow.com/q/73814924/4865723
Hello,
I'm aware that there is a `logging` package that is more _modern_ then
[`syslog`](https://docs.python.org/3/library/syslog.html). But I have
old code here to deal with that does use `syslog`. So that question is
specific to `s
> On 6 Mar 2022, at 19:38, Peter J. Holzer wrote:
>
> On 2022-03-06 18:28:59 +0100, Peter J. Holzer wrote:
>>> On 2022-03-05 16:25:38 +, Barry Scott wrote:
>>> Using the syslog() function means that any platform/distro details are
>>> hidden from the us
On 2022-03-06 18:28:59 +0100, Peter J. Holzer wrote:
> On 2022-03-05 16:25:38 +, 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".
&g
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
> On 4 Mar 2022, at 21:23, Peter J. Holzer wrote:
>
> On 2022-02-28 22:05:05 +, Barry Scott wrote:
>> On 28 Feb 2022, at 21:41, Peter J. Holzer wrote:
>>> On 2022-02-27 22:16:54 +, Barry wrote:
>>>> I have always assumed that if I want a logger sy
On 2022-02-28 22:05:05 +, Barry Scott wrote:
> On 28 Feb 2022, at 21:41, Peter J. Holzer wrote:
> > On 2022-02-27 22:16:54 +, Barry wrote:
> >> I have always assumed that if I want a logger syslog handler that I would
> >> have
> >> to implement it
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 fee
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
n'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.
When we say OSX
> On 28 Feb 2022, at 21:41, Peter J. Holzer wrote:
>
> On 2022-02-27 22:16:54 +, 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
>>
On 2022-02-27 22:16:54 +, 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.
>
; follow previously and I may be missing something fundamental. I've looked
> over a number of online examples but they don't seem to be running
> correctly either. I'm on Python 3.6.8 (though we're about to start an
> upgrade to the latest stable, if that in theory may h
On Sun, 27 Feb 2022 14:17:39 -0500, Dennis Lee Bieber
declaimed the following:
APOLOGIES -- I thought I KILLED the draft message, not sent it...
--
Wulfraed Dennis Lee Bieber AF6VN
wlfr...@ix.netcom.comhttp://wlfraed.microdiversity.freeddns.o
Thanks. Had tried it with no address, which defaults to ('localhost',
'514') as well as address='/var/run/syslog' which had been working
previously, and the doc recommends as:
For example, on Linux it’s usually ‘/dev/log’ but on OS/X it’s
‘/var/run/syslog’. You’ll n
On Sun, 27 Feb 2022 08:34:21 -0800, Philip Bloom
declaimed the following:
>
>sys_handler = SysLogHandler(address='/var/run/syslog')
As I read the documentation, the address is supposed to be the NETWORK
address of the machine to receive the log messages...
https://d
m to be running
correctly either. I'm on Python 3.6.8 (though we're about to start an
upgrade to the latest stable, if that in theory may have changes to syslog
handling). I'm mostly ending up here since I'm finding such differences in
response between python modules I'd expect
#x27;:(
> >> logging.StreamHandler(),
> >> logging.Formatter('VPN - %(levelname)s - %(message)s'),
> >> logging.ERROR,
> >> ),
> >> }
> >
> >
> > Yes, I could do it this way.
> >
> > But someho
ogging.ERROR,
>> ),
>> }
>
>
> Yes, I could do it this way.
>
> But somehow I am not happy with this solution.
>
> I think the filtering should be outside of python.
Do you think, it will be easier there?
You could also use the "syslog" han
On 09/15/2015 11:35 AM, Thomas Güttler wrote:
Yes, I could do it this way.
But somehow I am not happy with this solution.
I think the filtering should be outside of python.
[snip]
Can you understand my concerns?
Thomas Güttler
No, not really.
I showed you how it can be done in p
Am Freitag, 11. September 2015 10:18:11 UTC+2 schrieb marco@colosso.nl:
> On Friday, September 11, 2015 at 9:22:42 AM UTC+2, Thomas Güttler wrote:
> > Am Donnerstag, 10. September 2015 08:42:47 UTC+2 schrieb dieter:
> > > Thomas Güttler writes:
> > > > ...
> > > > Why we are unhappy with loggin
Am Freitag, 11. September 2015 11:03:52 UTC+2 schrieb jmp:
> On 09/11/2015 09:22 AM, Thomas Güttler wrote:
> >
> > I want INFO to be logged and stored on the remote host.
> > Therefore I must not filter INFO messages.
> >
> > I don't want to pull INFO messages over the VPN.
> >
> > Ergo, the filter
Thomas Güttler writes:
> Am Donnerstag, 10. September 2015 08:42:47 UTC+2 schrieb dieter:
>> Thomas Güttler writes:
>> > ...
>> > Why we are unhappy with logging to files:
>> >
>> > - filtering: We don't want to get INFO messages over the VPN.
>>
>> You can quite easily control at what level me
On 09/11/2015 09:22 AM, Thomas Güttler wrote:
I want INFO to be logged and stored on the remote host.
Therefore I must not filter INFO messages.
I don't want to pull INFO messages over the VPN.
Ergo, the filtering at Python level does not help in my use case.
Or I am missing something.
Proba
On Friday, September 11, 2015 at 9:22:42 AM UTC+2, Thomas Güttler wrote:
> Am Donnerstag, 10. September 2015 08:42:47 UTC+2 schrieb dieter:
> > Thomas Güttler writes:
> > > ...
> > > Why we are unhappy with logging to files:
> > >
> > > - filtering: We don't want to get INFO messages over the VPN.
Am Donnerstag, 10. September 2015 08:42:47 UTC+2 schrieb dieter:
> Thomas Güttler writes:
> > ...
> > Why we are unhappy with logging to files:
> >
> > - filtering: We don't want to get INFO messages over the VPN.
>
> You can quite easily control at what level messages are logged with
> the stand
Thomas Güttler writes:
> ...
> Why we are unhappy with logging to files:
>
> - filtering: We don't want to get INFO messages over the VPN.
You can quite easily control at what level messages are logged with
the standard Python logging framework. Each handler has a level
and will ignore messages
Up to now we use simple logging to files.
We don't use syslog or an other server based solution.
I am unsure which architecture works for our environment.
Our environment:
- django based applications
- a lot of batch/cron jobs (non web gui) processing
- One linux server runs several sy
On 2014-08-16, Terry Reedy wrote:
> On 8/15/2014 11:04 PM, Russell E. Owen wrote:
>> We are using the syslog module for logging, and would like to redirect
>> stderr to our log. Is there a practical way to do it?
>
> You can replace sys.stderr with any object with a .wri
In article <53eee06a$0$29984$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
> Russell E. Owen wrote:
>
> > I realize the logging module supports this and has a syslog writer, so
> > that's a fallback. But we were hoping to use the syslog module
On 8/15/2014 11:04 PM, Russell E. Owen wrote:
We are using the syslog module for logging, and would like to redirect
stderr to our log. Is there a practical way to do it?
You can replace sys.stderr with any object with a .write(s) method.
--
Terry Jan Reedy
--
https://mail.python.org
Russell E. Owen wrote:
> I realize the logging module supports this and has a syslog writer, so
> that's a fallback. But we were hoping to use the syslog module for
> performance.
Have you benchmarked your code and discovered that using the logging module
makes a noticeable
We are using the syslog module for logging, and would like to redirect
stderr to our log. Is there a practical way to do it?
I realize the logging module supports this and has a syslog writer, so
that's a fallback. But we were hoping to use the syslog module for
performance.
-- Ru
Basically I'm trying to write a snippet of code that outputs to both syslog
and the console at boot on a FreeBSD box, and I'm not 100% sure how to direct
the SysLogHandler to use the dmesg buffer instead of trying to use either
localhost:514 (and failing silently), or use /de
At 03:29 AM 8/6/2008, Matthew Woodcraft wrote:
In article <[EMAIL PROTECTED]>,
> How do I redirect ALL stderr stuff to syslog, even stderr from
> external programs that don't explicitly change their own stderr?
Sending messages to syslog involves more than writing to a fi
In article <[EMAIL PROTECTED]>,
> How do I redirect ALL stderr stuff to syslog, even stderr from
> external programs that don't explicitly change their own stderr?
Sending messages to syslog involves more than writing to a file
descriptor, so there's no way to make this
Hi,
I've just started to learn python (I've been using perl for some years).
How do I redirect ALL stderr stuff to syslog, even stderr from
external programs that don't explicitly change their own stderr?
Say I have a program called foo:
#!/usr/bin/python
import syslog
impor
On Aug 20, 2007, at 4:56 PM, greg wrote:
> Hi All,
>
> Could anyone tell me how I could syslog to a specific log (e.g. /var/
> log/daemon.log, /var/log/syslog.log...)?
>
# something like this:
import logging
logging.basicConfig(level=logging.DEBUG,
form
greg wrote:
> Could anyone tell me how I could syslog to a specific log (e.g. /var/
> log/daemon.log, /var/log/syslog.log...)?
>
> Thanks very much in advance!
It's up to your syslogd to route messages into particular files, based
on their facility and/or priority. Check out /e
Hi All,
Could anyone tell me how I could syslog to a specific log (e.g. /var/
log/daemon.log, /var/log/syslog.log...)?
Thanks very much in advance!
-Greg
--
http://mail.python.org/mailman/listinfo/python-list
if the program crashes or is
>killed without a closelog()?
>
>Jeff
>
In your terms, it's entirely safe to leave open the handle to syslog.
The operating system takes responsibility for cleanup on shutdown of
your application.
--
http://mail.python.org/mailman/listinfo/python-list
I have a question:
When should syslog.closelog() be called? I have a daemon that spends
most of its time asleep and quiet, but writes messages to the mail log
when active. Should I open the log at the start and keep it open until
the program closes? This seems much simpler than issuing three
c
WIndows has a syslog server. It's called the Windows Event Log. No need
to build a whole new one. *grin*
Now... if you just want an app that listens on a log port and sends
it's message to the Event Log, then I can't help you but to suggest
that a *nix knowledgable programmer may
I am a new bie of Python. I knew there is module for syslog of Linux,
but I want to create a syslog server on the windows server like windows
2k or 2k3, to collect the log message sent from our firewall. Any one
has any idea about this? Many thanks.
Jason Liu
--
http://mail.python.org/mailman
46 matches
Mail list logo