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 journal. This file
descriptor can be used internally by applications or be made standard
output or standard error of other processes executed.
sd_journal_stream_fd() takes a short program identifier string as
first argument, which will be written to the journal as
_SYSLOG_IDENTIFIER= field for each log entry (see
systemd.journal-fields(7) 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 syslog.h, see
syslog(3) for details. The third argument is a boolean: if true
kernel-style log level prefixes (such as SD_WARNING) are interpreted,
see sd-daemon(3) for more information.
It is recommended that applications log UTF-8 messages only with this
API, but this is not enforced.
Function sd_journal_stream_fd() is thread-safe and may be called from
multiple threads. All calls will return the same file descriptor,
although temporarily multiple file descriptors may be open.
The sd_journal_stream_fd() interface is available as a shared
library, which can be compiled and linked to with the
libsystemd pkg-config(1) file.
This page is part of the systemd (systemd system and service manager)
project. Information about the project can be found at
⟨http://www.freedesktop.org/wiki/Software/systemd⟩. If you have a bug
report for this manual page, see
page was obtained from the project's upstream Git repository
⟨https://github.com/systemd/systemd.git⟩ on 2017-03-13. If you dis‐
cover any rendering problems in this HTML version of the page, or you
believe there is a better or more up-to-date source for the page, or
you have corrections or improvements to the information in this
COLOPHON (which is not part of the original manual page), send a mail
systemd 233 SD_JOURNAL_STREAM_FD(3)