2
.\" Title: sd_journal_get_catalog
3
.\" Author: Lennart Poettering <lennart@poettering.net>
4
.\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/>
6
.\" Manual: sd_journal_get_catalog
10
.TH "SD_JOURNAL_GET_CATAL" "3" "" "systemd" "sd_journal_get_catalog"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
25
.\" disable justification (adjust text to left margin only)
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
31
sd_journal_get_catalog, sd_journal_get_catalog_for_message_id \- Retrieve message catalog entry
36
#include <systemd/sd\-journal\&.h>
39
.HP \w'int\ sd_journal_get_catalog('u
40
.BI "int sd_journal_get_catalog(sd_journal*\ " "j" ", const\ char**\ " "ret" ");"
41
.HP \w'int\ sd_journal_get_catalog_for_message_id('u
42
.BI "int sd_journal_get_catalog_for_message_id(sd_id128_t\ " "id" ", const\ char**\ " "ret" ");"
45
\fBsd_journal_get_catalog()\fR
46
retrieves a message catalog entry for the current journal entry\&. This will look up an entry in the message catalog by using the
48
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 it the current journal entry the "@" will be removed but the field name otherwise left untouched\&.
50
\fBsd_journal_get_catalog_for_message_id()\fR
52
\fBsd_journal_get_catalog()\fR
53
but the entry is looked up by the specified message ID (no open journal context is necessary for this), and no field substitution is done\&.
55
For more information about the journal message catalog please refer to the
56
\m[blue]\fBJournal Message Catalogs\fR\m[]\&\s-2\u[1]\d\s+2
60
\fBsd_journal_get_catalog()\fR
62
\fBsd_journal_get_catalog_for_message_id()\fR
63
return 0 on success or a negative errno\-style error code\&. If no matching message catalog entry is found \-ENOENT is returned\&.
67
\fBsd_journal_get_catalog()\fR
69
\fBsd_journal_get_catalog_for_message_id()\fR
70
interfaces are available as shared library, which can be compiled and linked to with the
78
\fBsystemd.journal-fields\fR(7),
80
\fBsd_journal_open\fR(3),
81
\fBsd_journal_next\fR(3),
82
\fBsd_journal_get_data\fR(3)
85
Journal Message Catalogs
87
\%http://www.freedesktop.org/wiki/Software/systemd/catalog