<div dir="ltr">Hi,<div><br></div><div>With the new release of Debian Jessie and systemd+journald integration, I'm looking for how to modernize our Python 3 toolbox to build daemons.</div><div><br></div><div>For now on Debian Wheezy, we use a SysLogHandler with UNIX socket: <a href="https://docs.python.org/3.4/library/logging.handlers.html#sysloghandler" target="_blank">https://docs.python.org/3.4/library/logging.handlers.html#sysloghandler</a></div><div>+ a custom rsyslog+logrotate configuration to split and manage log files.</div><div><br></div><div>From sysvinit to systemd migration to start our daemons, it should be easy, I've found this documentation: <a href="http://gunicorn-docs.readthedocs.org/en/latest/deploy.html#systemd" target="_blank">http://gunicorn-docs.readthedocs.org/en/latest/deploy.html#systemd</a></div><div><br></div><div>But for journald, even if I can use syslog UNIX socket provided by journald, I want to benefit the features of journald, especially structured logs.</div><div><br></div><div>I've seen the Python binding for journald: <a href="http://www.freedesktop.org/software/systemd/python-systemd/journal.html">http://www.freedesktop.org/software/systemd/python-systemd/journal.html</a></div><div>Nevertheless, I've two questions:</div><div><ol><li>I've seen no python logging handler for journald. Is it a desired situation or it's because no time to implement that ? Could you be interested in by an handler with journald ?</li><li>We use heavily AsyncIO module to have async pattern in Python, especially for I/O: <a href="https://docs.python.org/3/library/asyncio.html">https://docs.python.org/3/library/asyncio.html</a><br>In the source code of python-systemd, I've seen that you use a C glue to interact with journald, but I don't understand what's the communication between my Python daemon process and journald: unix sockets ? Other mechanism ? Depends on the mechanism, it should be have an impact for us.</li></ol><div>Thanks for your answers.</div></div><div><br></div><div>Have a nice week-end.</div><div><div><div><div dir="ltr"><div>--<br><div style="font-size:small"><div>Ludovic Gasc (GMLudo)</div></div><div style="font-size:small"><a href="http://www.gmludo.eu/" target="_blank">http://www.gmludo.eu/</a></div></div></div></div></div>
</div></div>