[systemd-devel] logging API
Jérémy Rosen
jeremy.rosen at smile.fr
Thu Apr 20 08:52:13 UTC 2017
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 at 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.rosen at smile.fr <mailto:jeremy.rosen at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20170420/d9031a99/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Logo.png
Type: image/png
Size: 3775 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20170420/d9031a99/attachment-0007.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Facebook.png
Type: image/png
Size: 835 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20170420/d9031a99/attachment-0008.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Slideshare.png
Type: image/png
Size: 967 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20170420/d9031a99/attachment-0009.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: LinkedIn.png
Type: image/png
Size: 816 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20170420/d9031a99/attachment-0010.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Twitter.png
Type: image/png
Size: 989 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20170420/d9031a99/attachment-0011.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OW_devient_Smile_ECS.png
Type: image/png
Size: 83679 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20170420/d9031a99/attachment-0012.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eco.png
Type: image/png
Size: 267 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20170420/d9031a99/attachment-0013.png>
More information about the systemd-devel
mailing list