1<!--$Id: env_set_msg_stream.so,v 10.5 2006/02/10 22:54:59 bostic Exp $-->
2<!--Copyright (c) 1997,2008 Oracle.  All rights reserved.-->
3<!--See the file LICENSE for redistribution information.-->
4<html>
5<head>
6<title>Berkeley DB: DbEnv::set_message_stream</title>
7<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
8<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
9</head>
10<body bgcolor=white>
11<table width="100%"><tr valign=top>
12<td>
13<b>DbEnv::set_message_stream</b>
14</td>
15<td align=right>
16<a href="../api_cxx/api_core.html"><img src="../images/api.gif" alt="API"></a>
17<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
18</tr></table>
19<hr size=1 noshade>
20<tt>
21<b><pre>
22#include &lt;db_cxx.h&gt;
23<p>
24void DbEnv::set_message_stream(class ostream*);
25</pre></b>
26<hr size=1 noshade>
27<b>Description: DbEnv::set_message_stream</b>
28<p>There are interfaces in the Berkeley DB library which either directly output
29informational messages or statistical information, or configure the
30library to output such messages when performing other operations, for
31example, <a href="../api_cxx/env_set_verbose.html">DbEnv::set_verbose</a> and <a href="../api_cxx/env_stat.html">DbEnv::stat_print</a>.</p>
32<p>The DbEnv::set_message_stream and
33<a href="../api_cxx/db_set_msg_stream.html">Db::set_message_stream</a> methods are used to display these messages for
34the application.  In this case, the message will include a trailing
35&lt;newline&gt; character.</p>
36<p>Setting <b>stream</b> to NULL unconfigures the interface.</p>
37<p>Alternatively, you can use the <a href="../api_cxx/env_set_msgfile.html">DbEnv::set_msgfile</a> and
38<a href="../api_cxx/db_set_msgfile.html">Db::set_msgfile</a> methods to display the messages via a C library FILE *,
39or the <a href="../api_cxx/env_set_msgcall.html">DbEnv::set_msgcall</a> and <a href="../api_cxx/db_set_msgcall.html">Db::set_msgcall</a> methods to
40capture the additional error information in a way that does not use
41either output streams or C library FILE *'s.  You should not mix these
42approaches.</p>
43<p>The DbEnv::set_message_stream method configures operations performed using the specified
44<a href="../api_cxx/env_class.html">DbEnv</a> handle, not all operations performed on the underlying
45database environment.</p>
46<p>The DbEnv::set_message_stream method may be called at any time during the life of the
47application.</p>
48<b>Parameters</b> <br>
49 <b>stream</b><ul compact><li>The <b>stream</b> parameter is the application-specified output stream to
50be used for additional message information.</ul>
51<br>
52<hr size=1 noshade>
53<br><b>Class</b>
54<a href="../api_cxx/env_class.html">DbEnv</a>
55<br><b>See Also</b>
56<a href="../api_cxx/env_list.html">Database Environments and Related Methods</a>
57</tt>
58<table width="100%"><tr><td><br></td><td align=right>
59<a href="../api_cxx/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
60</td></tr></table>
61<p><font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
62</body>
63</html>
64