Interesting issue writing to syslog

From: Timothy M.
Sent on: Tuesday, September 10, 2013 11:39 AM
Has anyone run into issues writing to syslog? According to the 2.6.6 documentation:


We don't really care about Solaris, but just as an academic exercise, we ran it there as well. Please see below: this runs fine on Mac, but not on RHEL6 or Solaris. Any ideas?

SOLARIS:

[myuser@mysystem3 ~]$ python
Python 2.6.2 (r262:71600, Sep  9 2009, 06:31:01) [GCC 3.4.6] on sunos5 Type "help", "copyright", "credits" or "license" for more information.
 >>> import syslog
 >>> syslog.openlog()
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
TypeError: ident string [, logoption [, facility]]  >>> syslog.openlog(facility = syslog.LOG_LOCAL6) Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
TypeError: openlog() takes no keyword arguments

RHEL6:

[myuser@mysystem-sas3-dev-h ~]$ python
Python 2.6.6 (r266:84292, May[masked], 05:35:12) [GCC[masked] (Red Hat 4.4.7-3)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
 >>> import syslog
 >>> syslog.openlog()
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
TypeError: ident string [, logoption [, facility]]  >>> syslog.openlog(facility = syslog.LOG_LOCAL6) Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
TypeError: openlog() takes no keyword arguments

MAC OS/X:

[myuser@aeonflux ~]$ python
Python 2.7.2 (default, Oct[masked], 20:14:37) [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin Type "help", "copyright", "credits" or "license" for more information.
 >>> import syslog
 >>> syslog.openlog()
 >>> syslog.openlog(facility = syslog.LOG_LOCAL6)

Any help would be much appreciated. Hopefully it isn't a rookie mistake.

Regards,

-Tim

Our Sponsors

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy