Debian Codegraph @

docs/api_reference/C/envset_msgcall.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;set_msgcall()</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="env.html" title="Chapter 5.  The DB_ENV Handle" />
11 <link rel="prev" href="envset_metadata_dir.html" title="DB_ENV-&gt;set_metadata_dir()" />
12 <link rel="next" href="envset_msgfile.html" title="DB_ENV-&gt;set_msgfile()" />
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;set_msgcall()</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="envset_metadata_dir.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 5. 
26 The DB_ENV Handle
27 </th>
28 <td width="20%" align="right"> <a accesskey="n" href="envset_msgfile.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="envset_msgcall"></a>DB_ENV-&gt;set_msgcall()</h2>
38 </div>
39 </div>
40 </div>
41 <pre class="programlisting">#include &lt;db.h&gt;
42
43 void
44 DB_ENV-&gt;set_msgcall(DB_ENV *dbenv,
45 void (*db_msgcall_fcn)(const DB_ENV *dbenv, const char *msg)); </pre>
46 <p>
47 There are interfaces in the Berkeley DB library which either directly
48 output informational messages or statistical information, or configure
49 the library to output such messages when performing other operations,
50 for example, <a class="xref" href="envset_verbose.html" title="DB_ENV-&gt;set_verbose()">DB_ENV-&gt;set_verbose()</a> and
51 <a class="xref" href="envstat.html" title="DB_ENV-&gt;stat_print()">DB_ENV-&gt;stat_print()</a>.
52 </p>
53 <p>
54 The <code class="methodname">DB_ENV-&gt;set_msgcall()</code> and
55 <a class="xref" href="dbset_msgcall.html" title="DB-&gt;set_msgcall()">DB-&gt;set_msgcall()</a>
56 methods are used to pass these messages to the application, and Berkeley DB will call
57 <span class="bold"><strong>db_msgcall_fcn</strong></span> with each message. It
58 is up to the <span class="bold"><strong>db_msgcall_fcn</strong></span> function
59 to display the message in an appropriate manner.
60 </p>
61 <p>
62 Setting <span class="bold"><strong>db_msgcall_fcn</strong></span> to NULL
63 unconfigures the callback interface.
64 </p>
65 <p>
66 Alternatively, you can use the
67
68 <a class="xref" href="dbset_msgfile.html" title="DB-&gt;set_msgfile()">DB-&gt;set_msgfile()</a> or
69 <a class="xref" href="envset_msgfile.html" title="DB_ENV-&gt;set_msgfile()">DB-&gt;set_msgfile()</a>
70 methods to display the messages via a C library FILE *.
71
72 </p>
73 <p>
74 The <code class="methodname">DB_ENV-&gt;set_msgcall()</code> method configures operations performed
75 using the specified <a class="link" href="env.html" title="Chapter 5.  The DB_ENV Handle">DB_ENV</a> handle, not all
76 operations performed on the underlying database environment.
77 </p>
78 <p>
79 The <code class="methodname">DB_ENV-&gt;set_msgcall()</code> method may be called at any time during the
80 life of the application.
81 </p>
82 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
83 <h3 class="title">Note</h3>
84 <p>
85 Berkeley DB is not re-entrant. Callback functions should not attempt to make library calls (for
86 example, to release locks or close open handles). Re-entering Berkeley DB is not guaranteed to work
87 correctly, and the results are undefined.
88 </p>
89 </div>
90 <div class="sect2" lang="en" xml:lang="en">
91 <div class="titlepage">
92 <div>
93 <div>
94 <h3 class="title"><a id="idp52201208"></a>Parameters</h3>
95 </div>
96 </div>
97 </div>
98 <div class="sect3" lang="en" xml:lang="en">
99 <div class="titlepage">
100 <div>
101 <div>
102 <h4 class="title"><a id="idp52201400"></a>db_msgcall_fcn</h4>
103 </div>
104 </div>
105 </div>
106 <p>
107 The <span class="bold"><strong>db_msgcall_fcn</strong></span> parameter is the
108 application-specified message reporting function. The function takes
109 two parameters:
110 </p>
111 <div class="itemizedlist">
112 <ul type="disc">
113 <li>
114 <p>
115 <code class="literal">dbenv</code>
116 </p>
117 <p>
118 The <span class="bold"><strong>dbenv</strong></span> parameter is the enclosing
119 database environment.
120 </p>
121 </li>
122 <li>
123 <p>
124 <code class="literal">msg</code>
125 </p>
126 <p>
127 The <span class="bold"><strong>msg</strong></span> parameter is the message
128 string.
129 </p>
130 </li>
131 </ul>
132 </div>
133 </div>
134 </div>
135 <div class="sect2" lang="en" xml:lang="en">
136 <div class="titlepage">
137 <div>
138 <div>
139 <h3 class="title"><a id="idp52215784"></a>Class</h3>
140 </div>
141 </div>
142 </div>
143 <p>
144 <a class="link" href="env.html" title="Chapter 5.  The DB_ENV Handle">DB_ENV</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="idp52202704"></a>See Also</h3>
152 </div>
153 </div>
154 </div>
155 <p>
156 <a class="xref" href="env.html#envlist" title="Database Environments and Related Methods">Database Environments 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="envset_metadata_dir.html">Prev</a> </td>
165 <td width="20%" align="center">
166 <a accesskey="u" href="env.html">Up</a>
167 </td>
168 <td width="40%" align="right"> <a accesskey="n" href="envset_msgfile.html">Next</a></td>
169 </tr>
170 <tr>
171 <td width="40%" align="left" valign="top">DB_ENV-&gt;set_metadata_dir() </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;set_msgfile()</td>
176 </tr>
177 </table>
178 </div>
179 </body>
180 </html>