]>
Commit | Line | Data |
---|---|---|
14228c0d | 1 | '\" t |
e842803a | 2 | .TH "SD_JOURNAL_GET_CATALOG" "3" "" "systemd 215" "sd_journal_get_catalog" |
14228c0d MB |
3 | .\" ----------------------------------------------------------------- |
4 | .\" * Define some portability stuff | |
5 | .\" ----------------------------------------------------------------- | |
6 | .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
7 | .\" http://bugs.debian.org/507673 | |
8 | .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html | |
9 | .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
10 | .ie \n(.g .ds Aq \(aq | |
11 | .el .ds Aq ' | |
12 | .\" ----------------------------------------------------------------- | |
13 | .\" * set default formatting | |
14 | .\" ----------------------------------------------------------------- | |
15 | .\" disable hyphenation | |
16 | .nh | |
17 | .\" disable justification (adjust text to left margin only) | |
18 | .ad l | |
19 | .\" ----------------------------------------------------------------- | |
20 | .\" * MAIN CONTENT STARTS HERE * | |
21 | .\" ----------------------------------------------------------------- | |
22 | .SH "NAME" | |
23 | sd_journal_get_catalog, sd_journal_get_catalog_for_message_id \- Retrieve message catalog entry | |
24 | .SH "SYNOPSIS" | |
25 | .sp | |
26 | .ft B | |
27 | .nf | |
28 | #include <systemd/sd\-journal\&.h> | |
29 | .fi | |
30 | .ft | |
31 | .HP \w'int\ sd_journal_get_catalog('u | |
60f067b4 | 32 | .BI "int sd_journal_get_catalog(sd_journal\ *" "j" ", char\ **" "ret" ");" |
14228c0d | 33 | .HP \w'int\ sd_journal_get_catalog_for_message_id('u |
60f067b4 | 34 | .BI "int sd_journal_get_catalog_for_message_id(sd_id128_t\ " "id" ", char\ **" "ret" ");" |
14228c0d MB |
35 | .SH "DESCRIPTION" |
36 | .PP | |
37 | \fBsd_journal_get_catalog()\fR | |
38 | retrieves a message catalog entry for the current journal entry\&. This will look up an entry in the message catalog by using the | |
39 | "MESSAGE_ID=" | |
40 | field of the current journal entry\&. Before returning the entry all journal field names in the catalog entry text enclosed in "@" will be replaced by the respective field values of the current entry\&. If a field name referenced in the message catalog entry does not exist, in the current journal entry, the "@" will be removed, but the field name otherwise left untouched\&. | |
41 | .PP | |
42 | \fBsd_journal_get_catalog_for_message_id()\fR | |
43 | works similar to | |
44 | \fBsd_journal_get_catalog()\fR | |
45 | but the entry is looked up by the specified message ID (no open journal context is necessary for this), and no field substitution is performed\&. | |
46 | .PP | |
47 | For more information about the journal message catalog please refer to the | |
48 | \m[blue]\fBJournal Message Catalogs\fR\m[]\&\s-2\u[1]\d\s+2 | |
49 | documentation page\&. | |
50 | .SH "RETURN VALUE" | |
51 | .PP | |
52 | \fBsd_journal_get_catalog()\fR | |
53 | and | |
54 | \fBsd_journal_get_catalog_for_message_id()\fR | |
55 | return 0 on success or a negative errno\-style error code\&. If no matching message catalog entry is found, \-ENOENT is returned\&. | |
56 | .PP | |
57 | On successful return, | |
58 | \fIret\fR | |
59 | points to a new string, which must be freed with | |
60 | \fBfree\fR(3)\&. | |
61 | .SH "NOTES" | |
62 | .PP | |
63 | The | |
64 | \fBsd_journal_get_catalog()\fR | |
65 | and | |
66 | \fBsd_journal_get_catalog_for_message_id()\fR | |
60f067b4 JS |
67 | interfaces are available as a shared library, which can be compiled and linked to with the |
68 | \fBlibsystemd\fR\ \&\fBpkg-config\fR(1) | |
14228c0d MB |
69 | file\&. |
70 | .SH "SEE ALSO" | |
71 | .PP | |
72 | \fBsystemd\fR(1), | |
73 | \fBsystemd.journal-fields\fR(7), | |
74 | \fBsd-journal\fR(3), | |
75 | \fBsd_journal_open\fR(3), | |
76 | \fBsd_journal_next\fR(3), | |
77 | \fBsd_journal_get_data\fR(3)\fBmalloc\fR(3) | |
78 | .SH "NOTES" | |
79 | .IP " 1." 4 | |
80 | Journal Message Catalogs | |
81 | .RS 4 | |
82 | \%http://www.freedesktop.org/wiki/Software/systemd/catalog | |
83 | .RE |