]> git.proxmox.com Git - systemd.git/blame - man/sd_journal_get_catalog.3
Imported Upstream version 217
[systemd.git] / man / sd_journal_get_catalog.3
CommitLineData
14228c0d 1'\" t
5eef597e 2.TH "SD_JOURNAL_GET_CATALOG" "3" "" "systemd 217" "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"
23sd_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
38retrieves 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="
40field 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
43works similar to
44\fBsd_journal_get_catalog()\fR
45but 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
47For 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
49documentation page\&.
50.SH "RETURN VALUE"
51.PP
52\fBsd_journal_get_catalog()\fR
53and
54\fBsd_journal_get_catalog_for_message_id()\fR
55return 0 on success or a negative errno\-style error code\&. If no matching message catalog entry is found, \-ENOENT is returned\&.
56.PP
57On successful return,
58\fIret\fR
59points to a new string, which must be freed with
60\fBfree\fR(3)\&.
61.SH "NOTES"
62.PP
63The
64\fBsd_journal_get_catalog()\fR
65and
66\fBsd_journal_get_catalog_for_message_id()\fR
60f067b4
JS
67interfaces are available as a shared library, which can be compiled and linked to with the
68\fBlibsystemd\fR\ \&\fBpkg-config\fR(1)
14228c0d
MB
69file\&.
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),
5eef597e
MP
77\fBsd_journal_get_data\fR(3),
78\fBmalloc\fR(3)
14228c0d
MB
79.SH "NOTES"
80.IP " 1." 4
81Journal Message Catalogs
82.RS 4
83\%http://www.freedesktop.org/wiki/Software/systemd/catalog
84.RE