1 <?xml version='
1.0'
?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC
"-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
6 This file is part of systemd.
8 Copyright 2012 Lennart Poettering
10 systemd is free software; you can redistribute it and/or modify it
11 under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
15 systemd is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
20 You should have received a copy of the GNU Lesser General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
24 <refentry id=
"sd-journal"
25 xmlns:
xi=
"http://www.w3.org/2001/XInclude">
28 <title>sd-journal
</title>
29 <productname>systemd
</productname>
33 <contrib>Developer
</contrib>
34 <firstname>Lennart
</firstname>
35 <surname>Poettering
</surname>
36 <email>lennart@poettering.net
</email>
42 <refentrytitle>sd-journal
</refentrytitle>
43 <manvolnum>3</manvolnum>
47 <refname>sd-journal
</refname>
48 <refpurpose>APIs for submitting and querying log entries to and
49 from the journal
</refpurpose>
54 <funcsynopsisinfo>#include
<systemd/sd-journal.h
></funcsynopsisinfo>
58 <command>pkg-config --cflags --libs libsystemd
</command>
64 <title>Description
</title>
66 <para><filename>sd-journal.h
</filename> provides APIs to submit
67 and query log entries. The APIs exposed act both as client for the
68 <citerefentry><refentrytitle>systemd-journald.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>
69 journal service and as parser for the journal files on disk.
73 <citerefentry><refentrytitle>sd_journal_print
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
74 <citerefentry><refentrytitle>sd_journal_stream_fd
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
75 <citerefentry><refentrytitle>sd_journal_open
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
76 <citerefentry><refentrytitle>sd_journal_next
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
77 <citerefentry><refentrytitle>sd_journal_get_realtime_usec
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
78 <citerefentry><refentrytitle>sd_journal_add_match
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
79 <citerefentry><refentrytitle>sd_journal_seek_head
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
80 <citerefentry><refentrytitle>sd_journal_get_cursor
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
81 <citerefentry><refentrytitle>sd_journal_get_cutoff_realtime_usec
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
82 <citerefentry><refentrytitle>sd_journal_get_cutoff_monotonic_usec
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
83 <citerefentry><refentrytitle>sd_journal_get_usage
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
84 <citerefentry><refentrytitle>sd_journal_get_catalog
</refentrytitle><manvolnum>3</manvolnum></citerefentry>
86 <citerefentry><refentrytitle>sd_journal_get_fd
</refentrytitle><manvolnum>3</manvolnum></citerefentry>
87 for more information about the functions implemented.
</para>
89 <para>Command line access for submitting entries to the journal is
91 <citerefentry><refentrytitle>systemd-cat
</refentrytitle><manvolnum>1</manvolnum></citerefentry>
92 tool. Command line access for querying entries from the journal is
94 <citerefentry><refentrytitle>journalctl
</refentrytitle><manvolnum>1</manvolnum></citerefentry>
98 <xi:include href=
"libsystemd-pkgconfig.xml" />
101 <title>See Also
</title>
103 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
104 <citerefentry><refentrytitle>sd_journal_print
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
105 <citerefentry><refentrytitle>sd_journal_stream_fd
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
106 <citerefentry><refentrytitle>sd_journal_open
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
107 <citerefentry><refentrytitle>sd_journal_next
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
108 <citerefentry><refentrytitle>sd_journal_get_data
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
109 <citerefentry><refentrytitle>sd_journal_get_realtime_usec
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
110 <citerefentry><refentrytitle>sd_journal_add_match
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
111 <citerefentry><refentrytitle>sd_journal_seek_head
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
112 <citerefentry><refentrytitle>sd_journal_get_cursor
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
113 <citerefentry><refentrytitle>sd_journal_get_cutoff_realtime_usec
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
114 <citerefentry><refentrytitle>sd_journal_get_cutoff_monotonic_usec
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
115 <citerefentry><refentrytitle>sd_journal_get_usage
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
116 <citerefentry><refentrytitle>sd_journal_get_fd
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
117 <citerefentry><refentrytitle>sd_journal_query_unique
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
118 <citerefentry><refentrytitle>sd_journal_get_catalog
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
119 <citerefentry><refentrytitle>journalctl
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
120 <citerefentry><refentrytitle>sd-id128
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
121 <citerefentry project='die-net'
><refentrytitle>pkg-config
</refentrytitle><manvolnum>1</manvolnum></citerefentry>