I spent a bit of time on IRC earlier today trying to figure out how to log to journald fields using Python. Apparently, that requires use of the native journald C API.
So, I wrote the necessary glue: https://github.com/davidstrauss/journald-python You can install it using PIP or any preferred setup.py-integrated utility. I look forward to providing real Python logging integration (as in log.error(), etc.), which I will add to the GitHub project in the form of normal Python. I'm fairly new to writing C extensions for Python. I welcome feedback/complaints about my bridging method, memory leaks, etc. Please post such feedback as issues on GitHub. Next on my list: a native PHP extension that logs everything using proper fields. It will also provide a function to log directly to journald from PHP. I will probably write this as a further expansion of APM, which I've already extended internally at Pantheon to log in a field-centric way as JSON POSTs to HTTP using cURL. -- David Strauss | Founder + CTO | Pantheon Systems | [email protected] _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
