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_message_stream()</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_metadata_dir.html" title="DbEnv::set_metadata_dir()" />
12 <link rel="next" href="envset_msgcall.html" title="DbEnv::set_msgcall()" />
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_message_stream()</th>
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.
28 <td width="20%" align="right"> <a accesskey="n" href="envset_msgcall.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_message_stream"></a>DbEnv::set_message_stream()</h2>
41 <pre class="programlisting">#include <db_cxx.h>
43 void DbEnv::set_message_stream(class ostream*); </pre>
45 There are interfaces in the Berkeley DB library which either
46 directly output informational messages or statistical
47 information, or configure the library to output such messages
48 when performing other operations. For example, the
49 <a class="xref" href="envset_verbose.html" title="DbEnv::set_verbose()">DbEnv::set_verbose()</a>
51 <a class="xref" href="envstat.html" title="DbEnv::stat_print()">DbEnv::stat_print()</a>
55 The <code class="methodname">DbEnv::set_message_stream()</code> and
56 <a class="xref" href="dbset_message_stream.html" title="Db::set_message_stream()">Db::set_message_stream()</a>
57 methods are used to display these messages for the application. In this case,
58 the message will include a trailing <code class="literal"><newline></code> character.
61 Setting <span class="bold"><strong>stream</strong></span> to NULL unconfigures the interface.
64 Alternatively, you can use the
65 <a class="xref" href="envset_msgfile.html" title="DbEnv::set_msgfile()">DbEnv::set_msgfile()</a> or
66 <a class="xref" href="dbset_msgfile.html" title="Db::set_msgfile()">Db::set_msgfile()</a> methods
67 to display the additional information via a C Library <code class="literal">FILE *</code>,
68 or the <a class="xref" href="envset_msgcall.html" title="DbEnv::set_msgcall()">DbEnv::set_msgcall()</a>
69 and <a class="xref" href="dbset_msgcall.html" title="Db::set_msgcall()">Db::set_msgcall()</a>
70 methods to capture the additional error information in a way that does not use either
71 output streams or C Library <code class="literal">FILE *</code>'s.
72 You should not mix these approaches.
75 The <code class="methodname">DbEnv::set_message_stream()</code> method configures
76 operations performed using the specified <a class="link" href="env.html" title="Chapter 5. The DbEnv Handle">DbEnv</a>
77 handle, not all operations performed on the underlying database environment.
80 The <code class="methodname">DbEnv::set_message_stream()</code> method may be called at any time during the
81 life of the application.
83 <div class="sect2" lang="en" xml:lang="en">
84 <div class="titlepage">
87 <h3 class="title"><a id="idp2194568"></a>Parameters</h3>
91 <div class="sect3" lang="en" xml:lang="en">
92 <div class="titlepage">
95 <h4 class="title"><a id="idp2194760"></a>stream</h4>
100 The <span class="bold"><strong>stream</strong></span> parameter is the
101 application-specified output stream to be used for additional message
106 <div class="sect2" lang="en" xml:lang="en">
107 <div class="titlepage">
110 <h3 class="title"><a id="idp2181608"></a>Class</h3>
115 <a class="link" href="env.html" title="Chapter 5. The DbEnv Handle">DbEnv</a>
118 <div class="sect2" lang="en" xml:lang="en">
119 <div class="titlepage">
122 <h3 class="title"><a id="idp2173592"></a>See Also</h3>
127 <a class="xref" href="env.html#envlist" title="Database Environments and Related Methods">Database Environments and Related Methods</a>
131 <div class="navfooter">
133 <table width="100%" summary="Navigation footer">
135 <td width="40%" align="left"><a accesskey="p" href="envset_metadata_dir.html">Prev</a> </td>
136 <td width="20%" align="center">
137 <a accesskey="u" href="env.html">Up</a>
139 <td width="40%" align="right"> <a accesskey="n" href="envset_msgcall.html">Next</a></td>
142 <td width="40%" align="left" valign="top">DbEnv::set_metadata_dir() </td>
143 <td width="20%" align="center">
144 <a accesskey="h" href="index.html">Home</a>
146 <td width="40%" align="right" valign="top"> DbEnv::set_msgcall()</td>