[Python-Dev] Bug? syslog.openlog using ident " python" by default. (original) (raw)

Antoine Pitrou solipsis at pitrou.net
Sat Mar 20 17:45:04 CET 2010


Sean Reifschneider <jafo tummy.com> writes:

I would propose changing the Python syslog() call to do the C equivalent of: if openloghasntbeencalledbeforenow: if sys.argv[0]: syslog.openlog(os.path.basename(sys.argv[0])) In other words, if there's a script name and openlog hasn't already been called, call openlog with the basename of the script name.

This looks fine to me. The compatibility breakage doesn't look too serious, given that "python" is an inappropriate name and therefore people would have changed it anyway.

By the way, why does logging have its own syslog implementation?

Regards

Antoine.



More information about the Python-Dev mailing list