On Sat, May 02, 2015 at 03:34:52PM +0200, Ludovic Gasc wrote: > Ok, my bad, I didn't see JournalHandler class to use with Python logging: > http://www.freedesktop.org/software/systemd/python-systemd/journal.html#journalhandler-class > > Nevertheless, my question about communication between Python and journald > remains. Can you rephrase the question? I don't quite understand what functionality you're missing from http://www.freedesktop.org/software/systemd/python-systemd/journal.html#systemd.journal.send .
Zbyszek > > -- > Ludovic Gasc (GMLudo) > http://www.gmludo.eu/ > > 2015-05-02 15:12 GMT+02:00 Ludovic Gasc <gml...@gmail.com>: > > > Hi, > > > > 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. > > > > For now on Debian Wheezy, we use a SysLogHandler with UNIX socket: > > https://docs.python.org/3.4/library/logging.handlers.html#sysloghandler > > + a custom rsyslog+logrotate configuration to split and manage log files. > > > > From sysvinit to systemd migration to start our daemons, it should be > > easy, I've found this documentation: > > http://gunicorn-docs.readthedocs.org/en/latest/deploy.html#systemd > > > > 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. > > > > I've seen the Python binding for journald: > > http://www.freedesktop.org/software/systemd/python-systemd/journal.html > > Nevertheless, I've two questions: > > > > 1. 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 ? > > 2. We use heavily AsyncIO module to have async pattern in Python, > > especially for I/O: https://docs.python.org/3/library/asyncio.html > > 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. > > > > Thanks for your answers. > > > > Have a nice week-end. > > -- > > Ludovic Gasc (GMLudo) > > http://www.gmludo.eu/ > > > _______________________________________________ > systemd-devel mailing list > systemd-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/systemd-devel _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel