[python-win32] How to generate syslog records from a Python program eg using Kiwi's KLOG_COM.dll?

Jeremy Nicoll - pyw32 jn.ml.pyw32.88 at wingsandbeaks.org.uk
Mon Mar 3 11:50:52 CET 2008


Tim Golden <mail at timgolden.me.uk> wrote:

> Jeremy Nicoll - pyw32 wrote:

> > Warning: I know nearly nothing about Windows, DLLs, COM etc.  My
> > programming has mainly been done on mainframes and RISC OS (ARM)
> > machines.
> > 
> > Kiwi Enterprises, at: http://www.kiwisyslog.com/ provide some free
> > syslog utilities.
> > 
> > Amongst them are a set of DLLs eg one called KLOG_COM.dll which I think
> > can be used from various programming languages to generate syslog
> > records.
> > 
> > As I found out about this way of generating syslog records while reading
> > about Kiwi's utilities I've assumed that this is the way (or at least a
> > good way) to generate syslog records from a Python program, but I
> > suppose there must be other ways too?  A platform-independent method
> > would clearly be better...
> 
> Just to save me downloading and trying to understand the Kiwi
> tools, the logging module has a SysLogHandler which (glancing
> quickly at the source) seems to be a handcrafted socket implementation
> which should therefore be cross-platform.

Ah, yes...   Thank-you!   I wish I'd known that existed.

Still, the logging module looks complicated to set up.  I'll experiment and
see where I get.

[The simplest of Kiwi's tools is KLOG.exe which allows one to generate a
syslog message from any command line and is therefore useful in .bat files
etc as well.  But I'd always assumed that using such a CLI command to pass
many thousands of debugging/trace messages out of a Python program might be
somewhat less efficient than using the same via an internal interface, which
is why I'd asked about this.  But clearly if Python can do it directly
that'd be much better, at least from Python programs, and I can still use
the simplest KLOG.exe from other places.]
  
-- 
Jeremy C B Nicoll - my opinions are my own.



More information about the python-win32 mailing list