syslog broken on FreeBSD?

Fredrik Lundh fredrik at pythonware.com
Wed Mar 14 00:42:57 CET 2001


Gabriel Ambuehl wrote:
> I've been trying to write to syslog using the following
> import syslog
> syslog("TEST)
> but there won't ever appear any message in the syslog. Is this module
> broken on FreeBSD 4.2 or am I doing something very wrong?

did you look for exceptions?

    >>> import syslog
    >>> syslog("TEST")
    TypeError: call of non-function (type module)

try changing your call to

    >>> syslog.syslog("TEST")

(and before you go looking for the message, make sure you know
where LOG_INFO/LOG_USER messages are sent on your machine.
if you don't know, ask your local sysadm for help)

Cheers /F





More information about the Python-list mailing list