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