OK so to condense the problem the following works at LOG_INFO default
priority ...

    def log(self, msg, priority):
        syslog.openlog(self.ident , syslog.LOG_PID)
        syslog.syslog('testing message')
        syslog.closelog()

But as soon as I try to set a priority API syslog docs, it fails to log ...

    def log(self, msg, priority):
        syslog.openlog(self.ident , syslog.LOG_PID)
        syslog.syslog((syslog.LOG_ALERT | syslog.LOG_USER), 'testing message')
        syslog.closelog()

PS tried LOG_LOCAL6 etc, same result.

Trying to change the priority in openlog() logs but does not appear to
change the priority since syslog.setlogmask() indicate it is stuck at
LOG_INFO

    def log(self, msg, priority):
        syslog.openlog(self.ident , syslog.LOG_PID, (syslog.LOG_ALERT
| syslog.LOG_LOCAL6))
        syslog.syslog('testing message')
        syslog.closelog()

Still stuck

Dave
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to