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">
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6 <title>DbEnv::set_msgfile()</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 DbEnv Handle" />
11 <link rel="prev" href="envset_msgcall.html" title="DbEnv::set_msgcall()" />
12 <link rel="next" href="envset_shm_key.html" title="DbEnv::set_shm_key()" />
15 <div xmlns="" class="navheader">
17 <p>Library Version 11.2.5.3</p>
19 <table width="100%" summary="Navigation header">
21 <th colspan="3" align="center">DbEnv::set_msgfile()</th>
24 <td width="20%" align="left"><a accesskey="p" href="envset_msgcall.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 5.
28 <td width="20%" align="right"> <a accesskey="n" href="envset_shm_key.html">Next</a></td>
33 <div class="sect1" lang="en" xml:lang="en">
34 <div class="titlepage">
37 <h2 class="title" style="clear: both"><a id="envset_msgfile"></a>DbEnv::set_msgfile()</h2>
41 <pre class="programlisting">#include <db_cxx.h>
44 DbEnv::set_msgfile(FILE *msgfile); </pre>
46 There are interfaces in the Berkeley DB library which either directly
47 output informational messages or statistical information, or configure
48 the library to output such messages when performing other operations,
49 for example, <a class="xref" href="envset_verbose.html" title="DbEnv::set_verbose()">DbEnv::set_verbose()</a> and
50 <a class="xref" href="envstat.html" title="DbEnv::stat_print()">DbEnv::stat_print()</a>.
53 The <code class="methodname">DbEnv::set_msgfile()</code> and
54 <a class="xref" href="dbset_msgfile.html" title="Db::set_msgfile()">Db::set_msgfile()</a> methods
55 are used to display these messages for the application. In this case
56 the message will include a trailing <newline> character.
59 Setting <span class="bold"><strong>msgfile</strong></span> to NULL unconfigures
63 Alternatively, you can use the
65 <a class="xref" href="envset_message_stream.html" title="DbEnv::set_message_stream()">DbEnv::set_message_stream()</a>
67 <a class="xref" href="dbset_message_stream.html" title="Db::set_message_stream()">Db::set_message_stream()</a>
68 methods to display the messages via an output stream, or the
71 <a class="xref" href="envset_msgcall.html" title="DbEnv::set_msgcall()">DbEnv::set_msgcall()</a> or
72 <a class="xref" href="dbset_msgcall.html" title="Db::set_msgcall()">Db::set_msgcall()</a>
73 methods to capture the additional error information in a way that does
74 not use C library FILE *'s.
75 <span>You should not mix these approaches.</span>
78 The <code class="methodname">DbEnv::set_msgfile()</code> method configures operations performed
79 using the specified <a class="link" href="env.html" title="Chapter 5. The DbEnv Handle">DbEnv</a> handle, not all
80 operations performed on the underlying database environment.
83 The <code class="methodname">DbEnv::set_msgfile()</code> method may be called at any time during the
84 life of the application.
86 <div class="sect2" lang="en" xml:lang="en">
87 <div class="titlepage">
90 <h3 class="title"><a id="idp2224200"></a>Parameters</h3>
94 <div class="sect3" lang="en" xml:lang="en">
95 <div class="titlepage">
98 <h4 class="title"><a id="idp2224392"></a>msgfile</h4>
103 The <span class="bold"><strong>msgfile</strong></span> parameter is a C library
104 FILE * to be used for displaying messages.
108 <div class="sect2" lang="en" xml:lang="en">
109 <div class="titlepage">
112 <h3 class="title"><a id="idp2203624"></a>Class</h3>
117 <a class="link" href="env.html" title="Chapter 5. The DbEnv Handle">DbEnv</a>
120 <div class="sect2" lang="en" xml:lang="en">
121 <div class="titlepage">
124 <h3 class="title"><a id="idp2203368"></a>See Also</h3>
129 <a class="xref" href="env.html#envlist" title="Database Environments and Related Methods">Database Environments and Related Methods</a>
133 <div class="navfooter">
135 <table width="100%" summary="Navigation footer">
137 <td width="40%" align="left"><a accesskey="p" href="envset_msgcall.html">Prev</a> </td>
138 <td width="20%" align="center">
139 <a accesskey="u" href="env.html">Up</a>
141 <td width="40%" align="right"> <a accesskey="n" href="envset_shm_key.html">Next</a></td>
144 <td width="40%" align="left" valign="top">DbEnv::set_msgcall() </td>
145 <td width="20%" align="center">
146 <a accesskey="h" href="index.html">Home</a>
148 <td width="40%" align="right" valign="top"> DbEnv::set_shm_key()</td>