1<!--$Id: env_set_msgfile.so,v 10.7 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: DB_ENV-&gt;set_msgfile</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>DB_ENV-&gt;set_msgfile</b>
14</td>
15<td align=right>
16<a href="../api_c/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.h&gt;
23<p>
24void
25DB_ENV-&gt;set_msgfile(DB_ENV *dbenv, FILE *msgfile);
26<p>
27void
28DB_ENV-&gt;get_msgfile(DB_ENV *dbenv, FILE **msgfilep);
29</pre></b>
30<hr size=1 noshade>
31<b>Description: DB_ENV-&gt;set_msgfile</b>
32<p>There are interfaces in the Berkeley DB library which either directly output
33informational messages or statistical information, or configure the
34library to output such messages when performing other operations, for
35example, <a href="../api_c/env_set_verbose.html">DB_ENV-&gt;set_verbose</a> and <a href="../api_c/env_stat.html">DB_ENV-&gt;stat_print</a>.</p>
36<p>The DB_ENV-&gt;set_msgfile and <a href="../api_c/db_set_msgfile.html">DB-&gt;set_msgfile</a> methods are used to
37display these messages for the application.
38In this case the message will include a trailing &lt;newline&gt;
39character.</p>
40<p>Setting <b>msgfile</b> to NULL unconfigures the interface.</p>
41<p>Alternatively, you can use the <a href="../api_c/env_set_msgcall.html">DB_ENV-&gt;set_msgcall</a> or
42<a href="../api_c/db_set_msgcall.html">DB-&gt;set_msgcall</a> methods to capture the additional error information
43in a way that does not use C library FILE *'s.</p>
44<p>The DB_ENV-&gt;set_msgfile method configures operations performed using the specified
45<a href="../api_c/env_class.html">DB_ENV</a> handle, not all operations performed on the underlying
46database environment.</p>
47<p>The DB_ENV-&gt;set_msgfile method may be called at any time during the life of the
48application.</p>
49<b>Parameters</b> <br>
50 <b>msgfile</b><ul compact><li>The <b>msgfile</b> parameter is a C library FILE * to be used for
51displaying messages.</ul>
52<br>
53<hr size=1 noshade>
54<b>Description: DB_ENV-&gt;get_msgfile</b>
55<p>The DB_ENV-&gt;get_msgfile method returns the FILE *.</p>
56<p>The DB_ENV-&gt;get_msgfile method may be called at any time during the life of the
57application.</p>
58<p>The DB_ENV-&gt;get_msgfile method
59returns a non-zero error value on failure
60and 0 on success.
61</p>
62<b>Parameters</b> <br>
63 <b>msgfilep</b><ul compact><li>The DB_ENV-&gt;get_msgfile method returns  the
64FILE * in <b>msgfilep</b>.</ul>
65<br>
66<hr size=1 noshade>
67<br><b>Class</b>
68<a href="../api_c/env_class.html">DB_ENV</a>
69<br><b>See Also</b>
70<a href="../api_c/env_list.html">Database Environments and Related Methods</a>
71</tt>
72<table width="100%"><tr><td><br></td><td align=right>
73<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
74</td></tr></table>
75<p><font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
76</body>
77</html>
78