The logging API provided by journald is already very rich, have a look
at man:sd_journal_send
if you just want log levels, do note that journald will parse lines
starting with "<1>" and related prefix as syslog levels and correctly
treat them... even if those messages arrive through the stdout of your
daemon
man:sd-daemon has the details of that particular feature. it's
particularly easy to use.
On 20/04/2017 09:41, Łukasz Stelmach wrote:
Hello.
I am writing a new piece of code. After several dozens of fprintf(3)
calls here and there I decided to clean that mess. I really like the
internal logging API (log_error(), log_debug(), log_info_errno() etc.)
used by systemd parts.
Is it possible to make it part of the public libsystemd API? Where to
start the work?
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
Logo <http://www.smile.fr/>
20 rue des Jardins
92600 Asnières-sur-Seine
www.smile.fr <http://www.smile.fr/>
*Jérémy ROSEN*
Architecte technique
Email : jeremy.ro...@smile.fr <mailto:jeremy.ro...@smile.fr>
Tel : +33141402967
Facebook <https://www.facebook.com/smileopensource> Google%2B
<http://fr.slideshare.net/SmileOpenSource/presentations> LinkedIn
<https://www.linkedin.com/company/smile> Twitter
<https://twitter.com/GroupeSmile>
bandeaux_mail
<http://www.smile.fr/Offres-services/Offres/Ingenierie?utm_source=signature&utm_medium=email&utm_campaign=signature>
eco Pour la planète, n'imprimez ce mail que si c'est nécessaire
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel