chiark / gitweb /
man: use the escape for "-" in example instead of space.
[elogind.git] / man / sd_journal_print.xml
index a716cc35e6cf35fb78e46989a84e285f4137d2ff..055094c9a2d8070ba2d6e69195e644e45fc1ea62 100644 (file)
                         <funcprototype>
                                 <funcdef>int <function>sd_journal_print</function></funcdef>
                                 <paramdef>int <parameter>priority</parameter></paramdef>
                         <funcprototype>
                                 <funcdef>int <function>sd_journal_print</function></funcdef>
                                 <paramdef>int <parameter>priority</parameter></paramdef>
-                                <paramdef>const char<parameter>format</parameter></paramdef>
+                                <paramdef>const char *<parameter>format</parameter></paramdef>
                                 <paramdef>...</paramdef>
                         </funcprototype>
 
                         <funcprototype>
                                 <funcdef>int <function>sd_journal_printv</function></funcdef>
                                 <paramdef>int <parameter>priority</parameter></paramdef>
                                 <paramdef>...</paramdef>
                         </funcprototype>
 
                         <funcprototype>
                                 <funcdef>int <function>sd_journal_printv</function></funcdef>
                                 <paramdef>int <parameter>priority</parameter></paramdef>
-                                <paramdef>const char<parameter>format</parameter></paramdef>
+                                <paramdef>const char *<parameter>format</parameter></paramdef>
                                 <paramdef>va_list <parameter>ap</parameter></paramdef>
                         </funcprototype>
 
                         <funcprototype>
                                 <funcdef>int <function>sd_journal_send</function></funcdef>
                                 <paramdef>va_list <parameter>ap</parameter></paramdef>
                         </funcprototype>
 
                         <funcprototype>
                                 <funcdef>int <function>sd_journal_send</function></funcdef>
-                                <paramdef>const char<parameter>format</parameter></paramdef>
+                                <paramdef>const char *<parameter>format</parameter></paramdef>
                                 <paramdef>...</paramdef>
                         </funcprototype>
 
                                 <paramdef>...</paramdef>
                         </funcprototype>
 
@@ -84,7 +84,7 @@
 
                         <funcprototype>
                                 <funcdef>int <function>sd_journal_perror</function></funcdef>
 
                         <funcprototype>
                                 <funcdef>int <function>sd_journal_perror</function></funcdef>
-                                <paramdef>const char<parameter>message</parameter></paramdef>
+                                <paramdef>const char *<parameter>message</parameter></paramdef>
                         </funcprototype>
 
                 </funcsynopsis>
                         </funcprototype>
 
                 </funcsynopsis>
@@ -98,9 +98,9 @@
                 system journal. The first argument is a priority
                 value. This is followed by a format string and its
                 parameters, similar to
                 system journal. The first argument is a priority
                 value. This is followed by a format string and its
                 parameters, similar to
-                <citerefentry><refentrytitle>printf</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                <citerefentry project='man-pages'><refentrytitle>printf</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 or
                 or
-                <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>. The
+                <citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>. The
                 priority value is one of
                 <constant>LOG_EMERG</constant>,
                 <constant>LOG_ALERT</constant>,
                 priority value is one of
                 <constant>LOG_EMERG</constant>,
                 <constant>LOG_ALERT</constant>,
                 <constant>LOG_INFO</constant>,
                 <constant>LOG_DEBUG</constant>, as defined in
                 <filename>syslog.h</filename>, see
                 <constant>LOG_INFO</constant>,
                 <constant>LOG_DEBUG</constant>, as defined in
                 <filename>syslog.h</filename>, see
-                <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                <citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 for details. It is recommended to use this call to
                 submit log messages in the application locale or system
                 locale and in UTF-8 format, but no such restrictions
                 for details. It is recommended to use this call to
                 submit log messages in the application locale or system
                 locale and in UTF-8 format, but no such restrictions
                 for details) instead of the format string. Each
                 structure should reference one field of the entry to
                 submit. The second argument specifies the number of
                 for details) instead of the format string. Each
                 structure should reference one field of the entry to
                 submit. The second argument specifies the number of
-                structures in the
-                array. <function>sd_journal_sendv()</function> is
+                structures in the array.
+                <function>sd_journal_sendv()</function> is
                 particularly useful to submit binary objects to the
                 journal where that is necessary.</para>
 
                 particularly useful to submit binary objects to the
                 journal where that is necessary.</para>
 
                 the passed string, suffixed with ": " and a human
                 readable representation of the current error code
                 stored in
                 the passed string, suffixed with ": " and a human
                 readable representation of the current error code
                 stored in
-                <citerefentry><refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum></citerefentry>. If
+                <citerefentry project='man-pages'><refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum></citerefentry>. If
                 the message string is passed as <constant>NULL</constant> or empty string,
                 only the error string representation will be written,
                 prefixed with nothing. An additional journal field
                 the message string is passed as <constant>NULL</constant> or empty string,
                 only the error string representation will be written,
                 prefixed with nothing. An additional journal field
@@ -193,7 +193,7 @@ sd_journal_send("MESSAGE=Hello World, this is PID %lu!", (unsigned long) getpid(
                 SD_JOURNAL_SUPPRESS_LOCATION before including
                 <filename>sd-journal.h</filename>.</para>
 
                 SD_JOURNAL_SUPPRESS_LOCATION before including
                 <filename>sd-journal.h</filename>.</para>
 
-                <para><citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                <para><citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 and <function>sd_journal_print()</function> may
                 largely be used interchangeably
                 functionality-wise. However, note that log messages
                 and <function>sd_journal_print()</function> may
                 largely be used interchangeably
                 functionality-wise. However, note that log messages
@@ -203,7 +203,7 @@ sd_journal_send("MESSAGE=Hello World, this is PID %lu!", (unsigned long) getpid(
                 be guaranteed. Using
                 <function>sd_journal_print()</function> has the
                 benefit of logging source code line, filenames, and
                 be guaranteed. Using
                 <function>sd_journal_print()</function> has the
                 benefit of logging source code line, filenames, and
-                functions as meta data along all entries, and
+                functions as metadata along all entries, and
                 guaranteeing chronological ordering with structured
                 log entries that are generated via
                 <function>sd_journal_send()</function>. Using
                 guaranteeing chronological ordering with structured
                 log entries that are generated via
                 <function>sd_journal_send()</function>. Using
@@ -216,8 +216,26 @@ sd_journal_send("MESSAGE=Hello World, this is PID %lu!", (unsigned long) getpid(
 
                 <para>The four calls return 0 on success or a negative
                 errno-style error code. The
 
                 <para>The four calls return 0 on success or a negative
                 errno-style error code. The
-                <citerefentry><refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                <citerefentry project='man-pages'><refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 variable itself is not altered.</para>
                 variable itself is not altered.</para>
+
+                <para>If
+                <citerefentry><refentrytitle>systemd-journald</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+                is not running (the socket is not present), those
+                functions do nothing, and also return 0.</para>
+        </refsect1>
+
+        <refsect1>
+                <title>Async signal safety</title>
+                <para><function>sd_journal_sendv()</function> is "async signal
+                safe" in the meaning of <citerefentry><refentrytitle>signal</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
+                </para>
+
+                <para><function>sd_journal_print</function>,
+                <function>sd_journal_printv</function>,
+                <function>sd_journal_send</function>, and
+                <function>sd_journal_perror</function> are
+                not async signal safe.</para>
         </refsect1>
 
         <refsect1>
         </refsect1>
 
         <refsect1>
@@ -229,7 +247,7 @@ sd_journal_send("MESSAGE=Hello World, this is PID %lu!", (unsigned long) getpid(
                 <function>sd_journal_sendv()</function> interfaces
                 are available as a shared library, which can be compiled
                 and linked to with the
                 <function>sd_journal_sendv()</function> interfaces
                 are available as a shared library, which can be compiled
                 and linked to with the
-                <constant>libsystemd-journal</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 file.</para>
         </refsect1>
 
                 file.</para>
         </refsect1>
 
@@ -240,10 +258,12 @@ sd_journal_send("MESSAGE=Hello World, this is PID %lu!", (unsigned long) getpid(
                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>sd_journal_stream_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</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 project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>perror</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>perror</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+                        <citerefentry project='man-pages'><refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>signal</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>socket</refentrytitle><manvolnum>7</manvolnum></citerefentry>
                 </para>
         </refsect1>
 
                 </para>
         </refsect1>