1SD_JOURNAL_GET_CATALOG(3)   sd_journal_get_catalog   SD_JOURNAL_GET_CATALOG(3)
2
3
4

NAME

6       sd_journal_get_catalog, sd_journal_get_catalog_for_message_id -
7       Retrieve message catalog entry
8

SYNOPSIS

10       #include <systemd/sd-journal.h>
11
12       int sd_journal_get_catalog(sd_journal *j, char **ret);
13
14       int sd_journal_get_catalog_for_message_id(sd_id128_t id, char **ret);
15

DESCRIPTION

17       sd_journal_get_catalog() retrieves a message catalog entry for the
18       current journal entry. This will look up an entry in the message
19       catalog by using the "MESSAGE_ID=" field of the current journal entry.
20       Before returning the entry all journal field names in the catalog entry
21       text enclosed in "@" will be replaced by the respective field values of
22       the current entry. If a field name referenced in the message catalog
23       entry does not exist, in the current journal entry, the "@" will be
24       removed, but the field name otherwise left untouched.
25
26       sd_journal_get_catalog_for_message_id() works similar to
27       sd_journal_get_catalog() but the entry is looked up by the specified
28       message ID (no open journal context is necessary for this), and no
29       field substitution is performed.
30
31       For more information about the journal message catalog please refer to
32       the Journal Message Catalogs[1] documentation page.
33

RETURN VALUE

35       sd_journal_get_catalog() and sd_journal_get_catalog_for_message_id()
36       return 0 on success or a negative errno-style error code. If no
37       matching message catalog entry is found, -ENOENT is returned.
38
39       On successful return, ret points to a new string, which must be freed
40       with free(3).
41

NOTES

43       The sd_journal_get_catalog() and
44       sd_journal_get_catalog_for_message_id() interfaces are available as a
45       shared library, which can be compiled and linked to with the
46       libsystemd pkg-config(1) file.
47

SEE ALSO

49       systemd(1), systemd.journal-fields(7), sd-journal(3),
50       sd_journal_open(3), sd_journal_next(3), sd_journal_get_data(3),
51       malloc(3)
52

NOTES

54        1. Journal Message Catalogs
55           http://www.freedesktop.org/wiki/Software/systemd/catalog
56
57
58
59systemd 219                                          SD_JOURNAL_GET_CATALOG(3)
Impressum