Debian Codegraph @

docs/api_reference/C/logprintf.html

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6 <title>DB_ENV-&gt;log_printf()</title>
7 <link rel="stylesheet" href="apiReference.css" type="text/css" />
8 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
9 <link rel="start" href="index.html" title="Berkeley DB C API Reference" />
10 <link rel="up" href="lsn.html" title="Chapter 7.  The DB_LSN Handle" />
11 <link rel="prev" href="envlog_get_config.html" title="DB_ENV-&gt;log_get_config()" />
12 <link rel="next" href="logput.html" title="DB_ENV-&gt;log_put()" />
13 </head>
14 <body>
15 <div xmlns="" class="navheader">
16 <div class="libver">
17 <p>Library Version 11.2.5.3</p>
18 </div>
19 <table width="100%" summary="Navigation header">
20 <tr>
21 <th colspan="3" align="center">DB_ENV-&gt;log_printf()</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="envlog_get_config.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 7. 
26 The DB_LSN Handle
27 </th>
28 <td width="20%" align="right"> <a accesskey="n" href="logput.html">Next</a></td>
29 </tr>
30 </table>
31 <hr />
32 </div>
33 <div class="sect1" lang="en" xml:lang="en">
34 <div class="titlepage">
35 <div>
36 <div>
37 <h2 class="title" style="clear: both"><a id="logprintf"></a>DB_ENV-&gt;log_printf()</h2>
38 </div>
39 </div>
40 </div>
41 <pre class="programlisting">#include &lt;db.h&gt;
42
43 int
44 DB_ENV-&gt;log_printf(DB_ENV *env, DB_TXN *txnid, const char *fmt, ...); </pre>
45 <p>
46 The <code class="methodname">DB_ENV-&gt;log_printf()</code> method appends an informational message to
47 the Berkeley DB database environment log files.
48 </p>
49 <p>
50 The <code class="methodname">DB_ENV-&gt;log_printf()</code> method allows applications to include
51 information in the database environment log files, for later review
52 using the <a class="link" href="db_printlog.html" title="db_printlog">db_printlog</a>
53 utility. This method is intended for debugging and performance
54 tuning.
55 </p>
56 <p>
57 The <code class="methodname">DB_ENV-&gt;log_printf()</code> <span>
58 <span>
59 method returns a non-zero error value on failure and 0 on success.
60 </span>
61
62 </span>
63 </p>
64 <div class="sect2" lang="en" xml:lang="en">
65 <div class="titlepage">
66 <div>
67 <div>
68 <h3 class="title"><a id="idp52901480"></a>Parameters</h3>
69 </div>
70 </div>
71 </div>
72 <div class="sect3" lang="en" xml:lang="en">
73 <div class="titlepage">
74 <div>
75 <div>
76 <h4 class="title"><a id="idp52893440"></a>txnid</h4>
77 </div>
78 </div>
79 </div>
80 <p>
81 If the logged message refers to an application-specified transaction,
82 the <span class="bold"><strong>txnid</strong></span> parameter is a transaction
83 handle returned from <a class="xref" href="txnbegin.html" title="DB_ENV-&gt;txn_begin()">DB_ENV-&gt;txn_begin()</a>;
84 otherwise NULL.
85 </p>
86 </div>
87 <div class="sect3" lang="en" xml:lang="en">
88 <div class="titlepage">
89 <div>
90 <div>
91 <h4 class="title"><a id="idp52879176"></a>fmt</h4>
92 </div>
93 </div>
94 </div>
95 <p>
96 A format string that specifies how subsequent arguments (or arguments
97 accessed via the variable-length argument facilities of stdarg(3)) are
98 converted for output. The format string may contain any formatting
99 directives supported by the underlying C library vsnprintf(3)
100 function.
101 </p>
102 </div>
103 </div>
104 <div class="sect2" lang="en" xml:lang="en">
105 <div class="titlepage">
106 <div>
107 <div>
108 <h3 class="title"><a id="idp52896880"></a>Errors</h3>
109 </div>
110 </div>
111 </div>
112 <p>
113 The <code class="methodname">DB_ENV-&gt;log_printf()</code> <span>
114 <span>
115 method may fail and return one of the following non-zero errors:
116 </span>
117
118 </span>
119 </p>
120 <div class="sect3" lang="en" xml:lang="en">
121 <div class="titlepage">
122 <div>
123 <div>
124 <h4 class="title"><a id="idp52885456"></a>EINVAL</h4>
125 </div>
126 </div>
127 </div>
128 <p>
129 An invalid flag value or parameter was specified.
130 </p>
131 </div>
132 </div>
133 <div class="sect2" lang="en" xml:lang="en">
134 <div class="titlepage">
135 <div>
136 <div>
137 <h3 class="title"><a id="idp52898440"></a>Class</h3>
138 </div>
139 </div>
140 </div>
141 <p>
142 <a class="link" href="env.html" title="Chapter 5.  The DB_ENV Handle">DB_ENV</a>,
143 <a class="link" href="logc.html" title="The DB_LOGC Handle">DB_LOGC</a>,
144 <a class="link" href="lsn.html" title="Chapter 7.  The DB_LSN Handle">DB_LSN</a>
145 </p>
146 </div>
147 <div class="sect2" lang="en" xml:lang="en">
148 <div class="titlepage">
149 <div>
150 <div>
151 <h3 class="title"><a id="idp52893504"></a>See Also</h3>
152 </div>
153 </div>
154 </div>
155 <p>
156 <a class="xref" href="lsn.html#loglist" title="Logging Subsystem and Related Methods">Logging Subsystem and Related Methods</a>
157 </p>
158 </div>
159 </div>
160 <div class="navfooter">
161 <hr />
162 <table width="100%" summary="Navigation footer">
163 <tr>
164 <td width="40%" align="left"><a accesskey="p" href="envlog_get_config.html">Prev</a> </td>
165 <td width="20%" align="center">
166 <a accesskey="u" href="lsn.html">Up</a>
167 </td>
168 <td width="40%" align="right"> <a accesskey="n" href="logput.html">Next</a></td>
169 </tr>
170 <tr>
171 <td width="40%" align="left" valign="top">DB_ENV-&gt;log_get_config() </td>
172 <td width="20%" align="center">
173 <a accesskey="h" href="index.html">Home</a>
174 </td>
175 <td width="40%" align="right" valign="top"> DB_ENV-&gt;log_put()</td>
176 </tr>
177 </table>
178 </div>
179 </body>
180 </html>