]> git.proxmox.com Git - systemd.git/blame - man/sd_journal_get_catalog.html
Imported Upstream version 217
[systemd.git] / man / sd_journal_get_catalog.html
CommitLineData
663996b3
MS
1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>sd_journal_get_catalog</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
2 a.headerlink {
3 color: #c60f0f;
4 font-size: 0.8em;
5 padding: 0 4px 0 4px;
6 text-decoration: none;
7 visibility: hidden;
8 }
9
10 a.headerlink:hover {
11 background-color: #c60f0f;
12 color: white;
13 }
14
15 h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
16 visibility: visible;
17 }
18 </style><a href="index.html">Index </a>·
19 <a href="systemd.directives.html">Directives </a>·
20 <a href="../python-systemd/index.html">Python </a>·
21 <a href="../libudev/index.html">libudev </a>·
5eef597e 22 <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_get_catalog"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_catalog, sd_journal_get_catalog_for_message_id — Retrieve message catalog entry</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_catalog</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_catalog_for_message_id</b>(</code></td><td>sd_id128_t <var class="pdparam">id</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214189797280"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_catalog()</code>
663996b3
MS
23 retrieves a message catalog entry for the current
24 journal entry. This will look up an entry in the
25 message catalog by using the
14228c0d 26 "<code class="literal">MESSAGE_ID=</code>" field of the current
663996b3
MS
27 journal entry. Before returning the entry all journal
28 field names in the catalog entry text enclosed in "@"
29 will be replaced by the respective field values of the
30 current entry. If a field name referenced in the
14228c0d
MB
31 message catalog entry does not exist, in the current
32 journal entry, the "@" will be removed, but the field
663996b3
MS
33 name otherwise left untouched.</p><p><code class="function">sd_journal_get_catalog_for_message_id()</code>
34 works similar to
35 <code class="function">sd_journal_get_catalog()</code> but the
36 entry is looked up by the specified message ID (no
37 open journal context is necessary for this), and no
38 field substitution is performed.</p><p>For more information about the journal message
39 catalog please refer to the <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/catalog" target="_top">Journal
5eef597e 40 Message Catalogs</a> documentation page.</p></div><div class="refsect1"><a name="idm214189791104"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_catalog()</code>
663996b3
MS
41 and
42 <code class="function">sd_journal_get_catalog_for_message_id()</code>
43 return 0 on success or a negative errno-style error
14228c0d 44 code. If no matching message catalog entry is found,
663996b3
MS
45 -ENOENT is returned.</p><p>On successful return, <em class="parameter"><code>ret</code></em>
46 points to a new string, which must be freed with
5eef597e
MP
47 <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>.
48 </p></div><div class="refsect1"><a name="idm214193744144"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_catalog()</code> and
663996b3 49 <code class="function">sd_journal_get_catalog_for_message_id()</code>
60f067b4 50 interfaces are available as a shared library, which can
663996b3 51 be compiled and linked to with the
5eef597e
MP
52 <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
53 file.</p></div><div class="refsect1"><a name="idm214193739728"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
663996b3
MS
54 <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
55 <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>,
56 <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
57 <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
58 <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
5eef597e 59 <a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>,
663996b3
MS
60 <a href="malloc.html"><span class="citerefentry"><span class="refentrytitle">malloc</span>(3)</span></a>
61 </p></div></div></body></html>