Debian Codegraph @

docs/api_reference/CXX/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>DbEnv::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 8.  The DbLsn Handle" />
11 <link rel="prev" href="envlog_get_config.html" title="DbEnv::log_get_config()" />
12 <link rel="next" href="logput.html" title="DbEnv::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">DbEnv::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 8. 
26 The DbLsn 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>DbEnv::log_printf()</h2>
38 </div>
39 </div>
40 </div>
41 <pre class="programlisting">#include &lt;db_cxx.h&gt;
42
43 int
44 DbEnv::log_printf(DB_TXN *txnid, const char *fmt, ...);</pre>
45 <p>
46 The <code class="methodname">DbEnv::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">DbEnv::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">DbEnv::log_printf()</code> <span>
58
59 <span>
60 method either returns a non-zero error value or throws an
61 exception that encapsulates a non-zero error value on
62 failure, and returns 0 on success.
63 </span>
64 </span>
65 </p>
66 <div class="sect2" lang="en" xml:lang="en">
67 <div class="titlepage">
68 <div>
69 <div>
70 <h3 class="title"><a id="idp8282424"></a>Parameters</h3>
71 </div>
72 </div>
73 </div>
74 <div class="sect3" lang="en" xml:lang="en">
75 <div class="titlepage">
76 <div>
77 <div>
78 <h4 class="title"><a id="idp8355856"></a>txnid</h4>
79 </div>
80 </div>
81 </div>
82 <p>
83 If the logged message refers to an application-specified transaction,
84 the <span class="bold"><strong>txnid</strong></span> parameter is a transaction
85 handle returned from <a class="xref" href="txnbegin.html" title="DbEnv::txn_begin()">DbEnv::txn_begin()</a>;
86 otherwise NULL.
87 </p>
88 </div>
89 <div class="sect3" lang="en" xml:lang="en">
90 <div class="titlepage">
91 <div>
92 <div>
93 <h4 class="title"><a id="idp8349960"></a>fmt</h4>
94 </div>
95 </div>
96 </div>
97 <p>
98 A format string that specifies how subsequent arguments (or arguments
99 accessed via the variable-length argument facilities of stdarg(3)) are
100 converted for output. The format string may contain any formatting
101 directives supported by the underlying C library vsnprintf(3)
102 function.
103 </p>
104 </div>
105 </div>
106 <div class="sect2" lang="en" xml:lang="en">
107 <div class="titlepage">
108 <div>
109 <div>
110 <h3 class="title"><a id="idp8351168"></a>Errors</h3>
111 </div>
112 </div>
113 </div>
114 <p>
115 The <code class="methodname">DbEnv::log_printf()</code> <span>
116
117 <span>
118 method may fail and throw a <a class="link" href="dbexception.html" title="Chapter 6. The DbException Class">DbException</a>
119 exception, encapsulating one of the following non-zero errors, or return one
120 of the following non-zero errors:
121 </span>
122 </span>
123 </p>
124 <div class="sect3" lang="en" xml:lang="en">
125 <div class="titlepage">
126 <div>
127 <div>
128 <h4 class="title"><a id="idp8359728"></a>EINVAL</h4>
129 </div>
130 </div>
131 </div>
132 <p>
133 An invalid flag value or parameter was specified.
134 </p>
135 </div>
136 </div>
137 <div class="sect2" lang="en" xml:lang="en">
138 <div class="titlepage">
139 <div>
140 <div>
141 <h3 class="title"><a id="idp8358432"></a>Class</h3>
142 </div>
143 </div>
144 </div>
145 <p>
146 <a class="link" href="env.html" title="Chapter 5.  The DbEnv Handle">DbEnv</a>,
147 <a class="link" href="logc.html" title="The DbLogc Handle">DbLogc</a>,
148 <a class="link" href="lsn.html" title="Chapter 8.  The DbLsn Handle">DbLsn</a>
149 </p>
150 </div>
151 <div class="sect2" lang="en" xml:lang="en">
152 <div class="titlepage">
153 <div>
154 <div>
155 <h3 class="title"><a id="idp8361056"></a>See Also</h3>
156 </div>
157 </div>
158 </div>
159 <p>
160 <a class="xref" href="lsn.html#loglist" title="Logging Subsystem and Related Methods">Logging Subsystem and Related Methods</a>
161 </p>
162 </div>
163 </div>
164 <div class="navfooter">
165 <hr />
166 <table width="100%" summary="Navigation footer">
167 <tr>
168 <td width="40%" align="left"><a accesskey="p" href="envlog_get_config.html">Prev</a> </td>
169 <td width="20%" align="center">
170 <a accesskey="u" href="lsn.html">Up</a>
171 </td>
172 <td width="40%" align="right"> <a accesskey="n" href="logput.html">Next</a></td>
173 </tr>
174 <tr>
175 <td width="40%" align="left" valign="top">DbEnv::log_get_config() </td>
176 <td width="20%" align="center">
177 <a accesskey="h" href="index.html">Home</a>
178 </td>
179 <td width="40%" align="right" valign="top"> DbEnv::log_put()</td>
180 </tr>
181 </table>
182 </div>
183 </body>
184 </html>