chiark / gitweb /
journald: fix another bad memory access
[elogind.git] / man / sd_journal_print.xml
index c40498b38a318e57d4945929dd5f20d1321d2ba0..dfe99192e7e7a28e5fd7b61532a8d4cd4aabf702 100644 (file)
@@ -47,6 +47,7 @@
                 <refname>sd_journal_printv</refname>
                 <refname>sd_journal_send</refname>
                 <refname>sd_journal_sendv</refname>
+                <refname>SD_JOURNAL_SUPPRESS_LOCATION</refname>
                 <refpurpose>Submit log entries to the journal</refpurpose>
         </refnamediv>
 
                 used to submit structured log entries to the system
                 journal. It takes a series of format strings, each
                 immediately followed by their associated parameters,
-                terminated by NULL. The strings passed should be of
+                terminated by NULL. The strings passed should be of
                 the format <literal>VARIABLE=value</literal>. The
                 variable name must be in uppercase and consist only
                 of characters, numbers and underscores, and may not
                 journal where that is necessary.</para>
 
                 <para>Note that <function>sd_journal_send()</function>
-                is a wapper around
+                is a wrapper around
                 <function>sd_journal_sendv()</function> to make it
                 easier to use when only text strings shall be
                 submitted. Also, the following two calls are
@@ -168,6 +169,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
+                largely be used interchangeably
+                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>
@@ -196,7 +214,7 @@ sd_journal_send("MESSAGE=Hello World, this is PID %lu!", (unsigned long) getpid(
 
                 <para>
                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>sd_journal_stream_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>