We are using a basic python log server based on BaseHTTPServer to aggregate our python logs on an ubunutu server. This solution has fulfilled our needs... until now. The number of programs dumping to this log server has grown and now the logger is crippling the system.
Now that we are back to the drawing board, we are considering using syslog.
Would it be advantageous to use syslog over other logging facilites.
Thanks for the help
Using syslog might be simple and fast, but it cannot give you full control over how your logs are aggregated.
Your main problem now is using BaseHTTPServer, which was never meant to be used on a production server, or for anything needing high performance.
I see two options:
Edit: A dedicated solution that supports message queues is logbook. It can also be used as direct replacement of the standard library's logging module.
The advantages of using syslog where available (all modern *nix systems, including Linux, FreeBSD, OS-X etc.) are numerous:
man syslog
)logger
)The only disadvantage I can think of is that syslog
is non portable (to non *nix systems), but if you're on any modern *nix, any alternative is more complicated and likely less reliable.
The concern of losing packets because syslog
is using UDP may be valid, but in practice on a LAN, I've never found it to be an issue.
Not sure why HTTP is needed but this surely adds an overhead. Not to mention that the python implementation might not be up to the task. I can recommend syslog , but beware that using UDP for transport can result in message loss so TCP is highly recommended. syslog-ng and rsyslog can both handle TCP syslog. nxlog can too, and is not even bound to the syslog protocol.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With