[sr-dev] [kamailio] log to journald directly (#370)
Daniel-Constantin Mierla
notifications at github.com
Tue Oct 20 12:46:47 CEST 2015
My first thought was to use a pointer to logging function and set that by default to syslog. A module can overwrite the pointer with another function. Obviously that can happen when the module is loaded.
In this way, all logging will go through the new function, no need to change something else -- so xlog() as well as the other messages from C code will be handled by the new function.
On the other hand, sd_journal_print() seems to be a macro, meaning it cannot be used as pointer for a function. The advantage of the macro is ability to get the file name, line and function name of its use location. However, we already do this via our LOG/DEBUG macros, prefixing the log messages with these attributes.
---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/370#issuecomment-149519506
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20151020/7b15f347/attachment.html>
More information about the sr-dev
mailing list