• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src/router/db-4.8.30/docs/api_reference/CXX/
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::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_isalive.html" title="DbEnv::set_isalive()" />
12    <link rel="next" href="envset_msgcall.html" title="DbEnv::set_msgcall()" />
13  </head>
14  <body>
15    <div class="navheader">
16      <table width="100%" summary="Navigation header">
17        <tr>
18          <th colspan="3" align="center">DbEnv::set_message_stream()</th>
19        </tr>
20        <tr>
21          <td width="20%" align="left"><a accesskey="p" href="envset_isalive.html">Prev</a> </td>
22          <th width="60%" align="center">Chapter 5. 
23                The DbEnv Handle
24        </th>
25          <td width="20%" align="right"> <a accesskey="n" href="envset_msgcall.html">Next</a></td>
26        </tr>
27      </table>
28      <hr />
29    </div>
30    <div class="sect1" lang="en" xml:lang="en">
31      <div class="titlepage">
32        <div>
33          <div>
34            <h2 class="title" style="clear: both"><a id="envset_message_stream"></a>DbEnv::set_message_stream()</h2>
35          </div>
36        </div>
37      </div>
38      <pre class="programlisting">#include &lt;db_cxx.h&gt;
39
40void DbEnv::set_message_stream(class ostream*); </pre>
41      <p>
42            There are interfaces in the Berkeley DB library which either
43            directly output informational messages or statistical
44            information, or configure the library to output such messages
45            when performing other operations. For example, the
46            <a class="xref" href="envset_verbose.html" title="DbEnv::set_verbose()">DbEnv::set_verbose()</a>
47            and
48            <a class="xref" href="envstat.html" title="DbEnv::stat_print()">DbEnv::stat_print()</a>
49            methods.
50    </p>
51      <p>
52         The <code class="methodname">DbEnv::set_message_stream()</code> and
53         <a class="xref" href="dbset_message_stream.html" title="Db::set_message_stream()">Db::set_message_stream()</a>  
54         methods are used to display these messages for the application. In this case, 
55         the message will include a trailing <code class="literal">&lt;newline&gt;</code> character.
56    </p>
57      <p>
58            Setting <span class="bold"><strong>stream</strong></span> to NULL unconfigures the interface.
59    </p>
60      <p>
61            Alternatively, you can use the
62            <a class="xref" href="envset_msgfile.html" title="DbEnv::set_msgfile()">DbEnv::set_msgfile()</a> or
63            <a class="xref" href="dbset_msgfile.html" title="Db::set_msgfile()">Db::set_msgfile()</a> methods
64            to display the additional information via a C Library <code class="literal">FILE *</code>,
65            or the <a class="xref" href="envset_msgcall.html" title="DbEnv::set_msgcall()">DbEnv::set_msgcall()</a> 
66            and <a class="xref" href="dbset_msgcall.html" title="Db::set_msgcall()">Db::set_msgcall()</a>
67            methods to capture the additional error information in a way that does not use either
68            output streams or C Library <code class="literal">FILE *</code>'s.
69            You should not mix these approaches.
70    </p>
71      <p>
72            The <code class="methodname">DbEnv::set_message_stream()</code> method configures 
73            operations performed using the specified <a class="link" href="env.html" title="Chapter 5.  The DbEnv Handle">DbEnv</a>
74            handle, not all operations performed on the underlying database environment.
75    </p>
76      <p>
77         The <code class="methodname">DbEnv::set_message_stream()</code> method may be called at any time during the
78         life of the application.
79    </p>
80      <div class="sect2" lang="en" xml:lang="en">
81        <div class="titlepage">
82          <div>
83            <div>
84              <h3 class="title"><a id="id1673634"></a>Parameters</h3>
85            </div>
86          </div>
87        </div>
88        <div class="sect3" lang="en" xml:lang="en">
89          <div class="titlepage">
90            <div>
91              <div>
92                <h4 class="title"><a id="id1673822"></a>stream</h4>
93              </div>
94            </div>
95          </div>
96          <p>
97                             The <span class="bold"><strong>stream</strong></span> parameter is the
98                             application-specified output stream to be used for additional message
99                             information.
100                     </p>
101        </div>
102      </div>
103      <div class="sect2" lang="en" xml:lang="en">
104        <div class="titlepage">
105          <div>
106            <div>
107              <h3 class="title"><a id="id1674058"></a>Class</h3>
108            </div>
109          </div>
110        </div>
111        <p>
112                <a class="link" href="env.html" title="Chapter 5.  The DbEnv Handle">DbEnv</a>  
113            </p>
114      </div>
115      <div class="sect2" lang="en" xml:lang="en">
116        <div class="titlepage">
117          <div>
118            <div>
119              <h3 class="title"><a id="id1673983"></a>See Also</h3>
120            </div>
121          </div>
122        </div>
123        <p>
124                     <a class="xref" href="env.html#envlist" title="Database Environments and Related Methods">Database Environments and Related Methods</a> 
125                </p>
126      </div>
127    </div>
128    <div class="navfooter">
129      <hr />
130      <table width="100%" summary="Navigation footer">
131        <tr>
132          <td width="40%" align="left"><a accesskey="p" href="envset_isalive.html">Prev</a> </td>
133          <td width="20%" align="center">
134            <a accesskey="u" href="env.html">Up</a>
135          </td>
136          <td width="40%" align="right"> <a accesskey="n" href="envset_msgcall.html">Next</a></td>
137        </tr>
138        <tr>
139          <td width="40%" align="left" valign="top">DbEnv::set_isalive() </td>
140          <td width="20%" align="center">
141            <a accesskey="h" href="index.html">Home</a>
142          </td>
143          <td width="40%" align="right" valign="top"> DbEnv::set_msgcall()</td>
144        </tr>
145      </table>
146    </div>
147  </body>
148</html>
149