How to configure syslog for logging in Python -


i have started use logging module in python. python code logs via several handlers in code still use syslog module. when tried replace , add handler logging, found out output differs.

logging.handlers.sysloghandler(address = "/dev/log") ... logging.error("foo")  syslog.syslog(syslog.log_err, "foo") 

the output is:

apr 14 16:42:33 hroch journal: foo  apr  2 10:11:51 hroch myscript: unable connect/login fencing device 

attempt use logging.formatter did not bring success part after colon changed.

the address= parameter sysloghandler() should (host, port) tuple. try leaving off; default ('localhost', syslog_udp_port), might want.


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -