X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=man%2Fsd_journal_stream_fd.xml;h=a8dc8fd08aa92356e67512acde9241ed727fd02c;hb=6bb648a16ae4a682ad4784412af706d2e6a3e4da;hp=3d2ed1d8f3db2bd7698201821da9ff258e0e2908;hpb=a81df0ad90f0dea0eb272c02efe18934fa66fdf2;p=elogind.git
diff --git a/man/sd_journal_stream_fd.xml b/man/sd_journal_stream_fd.xml
index 3d2ed1d8f..a8dc8fd08 100644
--- a/man/sd_journal_stream_fd.xml
+++ b/man/sd_journal_stream_fd.xml
@@ -67,7 +67,7 @@
sd_journal_stream_fd() may
be used to create a log stream file descriptor. Log
messages written to this file descriptor as simple
- newline separated text strings are written to the
+ newline-separated text strings are written to the
journal. This file descriptor can be used internally
by applications or be made STDOUT/STDERR of other
processes executed.
@@ -79,24 +79,24 @@
systemd.journal-fields7
for more information). The second argument shall be
the default priority level for all messages. The
- priority level is one of LOG_EMERG,
- LOG_ALERT,
- LOG_CRIT,
- LOG_ERR,
- LOG_WARNING,
- LOG_NOTICE,
- LOG_INFO,
- LOG_DEBUG, as defined in
+ priority level is one of LOG_EMERG,
+ LOG_ALERT,
+ LOG_CRIT,
+ LOG_ERR,
+ LOG_WARNING,
+ LOG_NOTICE,
+ LOG_INFO,
+ LOG_DEBUG, as defined in
syslog.h, see
syslog3
for details. The third argument is a boolean: if true
kernel-style log priority level prefixes (such as
- SD_WARNING) are interpreted, see
+ SD_WARNING) are interpreted, see
sd-daemon3
for more information.
It is recommended that applications log UTF-8
- mesages only with this API, but this is not
+ messages only with this API, but this is not
enforced.
@@ -112,10 +112,9 @@
Notes
The sd_journal_stream_fd()
- interface is available as shared library, which can
+ interface is available as a shared library, which can
be compiled and linked to with the
- libsystemd-journal
- pkg-config1
+ libsystemd-journal pkg-config1
file.
@@ -127,6 +126,8 @@
#include <syslog.h>
#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
#include <systemd/sd-journal.h>
#include <systemd/sd-daemon.h>
@@ -147,6 +148,7 @@ int main(int argc, char *argv[]) {
fprintf(log, "Hello World!\n");
fprintf(log, SD_WARNING "This is a warning!\n");
fclose(log);
+ return 0;
}