1SD-JOURNAL(3)                     sd-journal                     SD-JOURNAL(3)
2
3
4

NAME

6       sd-journal - APIs for submitting and querying log entries to and from
7       the journal
8

SYNOPSIS

10       #include <systemd/sd-journal.h>
11
12       pkg-config --cflags --libs libsystemd
13

DESCRIPTION

15       sd-journal.h provides APIs to submit and query log entries. The APIs
16       exposed act both as client for the systemd-journald.service(8) journal
17       service and as parser for the journal files on disk.
18
19       See sd_journal_print(3), sd_journal_stream_fd(3), sd_journal_open(3),
20       sd_journal_next(3), sd_journal_get_realtime_usec(3),
21       sd_journal_add_match(3), sd_journal_seek_head(3),
22       sd_journal_enumerate_fields(3), sd_journal_get_cursor(3),
23       sd_journal_get_cutoff_realtime_usec(3),
24       sd_journal_get_cutoff_monotonic_usec(3), sd_journal_get_usage(3),
25       sd_journal_get_catalog(3), sd_journal_get_fd(3),
26       sd_journal_has_runtime_files(3) and sd_journal_has_persistent_files(3)
27       for more information about the functions implemented.
28
29       Command line access for submitting entries to the journal is available
30       with the systemd-cat(1) tool. Command line access for querying entries
31       from the journal is available with the journalctl(1) tool.
32

THREAD SAFETY

34       Functions that operate on the sd_journal object are thread agnostic —
35       given sd_journal pointer may only be used from one thread at a time,
36       but multiple threads may use multiple such objects safely. Other
37       functions — those that are used to send entries to the journal, like
38       sd_journal_print(3) and similar, or those that are used to retrieve
39       global information like sd_journal_stream_fd(3) and
40       sd_journal_get_catalog_for_message_id(3) — are thread-safe and may be
41       called from multiple threads in parallel.
42

NOTES

44       These APIs are implemented as a shared library, which can be compiled
45       and linked to with the libsystemd pkg-config(1) file.
46

SEE ALSO

48       systemd(1), sd_journal_print(3), sd_journal_stream_fd(3),
49       sd_journal_open(3), sd_journal_next(3), sd_journal_get_data(3),
50       sd_journal_get_realtime_usec(3), sd_journal_add_match(3),
51       sd_journal_seek_head(3), sd_journal_enumerate_fields(3),
52       sd_journal_get_cursor(3), sd_journal_get_cutoff_realtime_usec(3),
53       sd_journal_get_cutoff_monotonic_usec(3), sd_journal_get_usage(3),
54       sd_journal_get_fd(3), sd_journal_query_unique(3),
55       sd_journal_get_catalog(3), sd_journal_has_runtime_files(3),
56       sd_journal_has_persistent_files(3), journalctl(1), sd-id128(3), pkg-
57       config(1)
58
59
60
61systemd 239                                                      SD-JOURNAL(3)
Impressum