[systemd-commits] man/sd_journal_print.xml

Lennart Poettering lennart at kemper.freedesktop.org
Mon Jul 9 07:04:34 PDT 2012


 man/sd_journal_print.xml |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)

New commits:
commit 6aae0ed2d5915c28b27857fe0cf16e01b21a1882
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Jul 9 16:04:21 2012 +0200

    man: explain why people should/shouldn't use sd_journal_print()

diff --git a/man/sd_journal_print.xml b/man/sd_journal_print.xml
index c40498b..2d5d363 100644
--- a/man/sd_journal_print.xml
+++ b/man/sd_journal_print.xml
@@ -168,6 +168,23 @@ sd_journal_send("MESSAGE=Hello World, this is PID %lu!", (unsigned long) getpid(
                 not desired it can be turned off by defining
                 SD_JOURNAL_SUPPRESS_LOCATION before including
                 <filename>sd-journal.h</filename>.</para>
+
+                <para><citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                and and <function>sd_journal_print()</function> may
+                mostly be used interchangably
+                functionality-wise. However, note that log messages
+                logged via the former take a different path to the
+                journal server than the later, and hence global
+                chronological ordering between the two streams cannot
+                be guaranteed. Using
+                <function>sd_journal_print()</function> has the
+                benefit of logging source code line, file names, and
+                functions as meta data along all entries, and
+                guaranteeing chronological ordering with structured
+                log entries that are generated via
+                <function>sd_journal_send()</function>. Using
+                <function>syslog()</function> has the benefit of being
+                more portable.</para>
         </refsect1>
 
         <refsect1>



More information about the systemd-commits mailing list