[asterisk-dev] Journald support for Asterisk

Ludovic Gasc gmludo at gmail.com
Sat May 9 03:17:24 CDT 2015


Hi,

Systemd and Journald is now by default on Debian Jessie and Ubuntu 15.04,
as on RHEL/CentOS.
Journald supports syslog format, nevertheless, at least for us, the
structured log system provided with journald helps us to debug the
production.

The idea behind that is to attach metadata with a log line to facilitate
the search with journalctl, you can write queries to find the errors.

For example, with Apache:
http://httpd.apache.org/docs/trunk/mod/mod_journald.html

For our Python daemons, for each log line, we store account_id, request_id,
endpoint and method used to be easy to retrieve quickly interesting logs.

Moreover, not yet used for us, but you can generate statistics about your
source code real usage based on:
http://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html#CODE_FILE=

For Asterisk, for example with dialplan logging, you should attach the
context, the extension and the channel.

You can simulate this journald feature with a specific format message for
your logs, nevertheless, journalctl is more user-friendly to retrieve
pertinent logs compare to the classical grep usage.

I'm permitted to raise the question about an eventual journald support in
Asterisk because I don't find anything about that in issues tracker nor
mailing list.

Moreover, I understand that even if you add the journald support, it's
certainly necessary to change logging everywhere in Asterisk, however, I
should help to do that.

Regards.
--
Ludovic Gasc (GMLudo)
http://www.gmludo.eu/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20150509/108a1928/attachment.html>


More information about the asterisk-dev mailing list