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:

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

Logo <>

20 rue des Jardins
92600 Asnières-sur-Seine <>       
*Jérémy ROSEN*
Architecte technique
Email : <>
Tel : +33141402967

Facebook <> Google%2B <> LinkedIn <> Twitter <>

bandeaux_mail <>

eco Pour la planète, n'imprimez ce mail que si c'est nécessaire
systemd-devel mailing list

Reply via email to