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_msgfile()</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_msgcall.html" title="DbEnv::set_msgcall()" /> 12 <link rel="next" href="envset_shm_key.html" title="DbEnv::set_shm_key()" /> 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_msgfile()</th> 19 </tr> 20 <tr> 21 <td width="20%" align="left"><a accesskey="p" href="envset_msgcall.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_shm_key.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_msgfile"></a>DbEnv::set_msgfile()</h2> 35 </div> 36 </div> 37 </div> 38 <pre class="programlisting">#include <db_cxx.h> 39 40void 41DbEnv::set_msgfile(FILE *msgfile); </pre> 42 <p> 43 There are interfaces in the Berkeley DB library which either directly 44 output informational messages or statistical information, or configure 45 the library to output such messages when performing other operations, 46 for example, <a class="xref" href="envset_verbose.html" title="DbEnv::set_verbose()">DbEnv::set_verbose()</a> and 47 <a class="xref" href="envstat.html" title="DbEnv::stat_print()">DbEnv::stat_print()</a>. 48 </p> 49 <p> 50 The <code class="methodname">DbEnv::set_msgfile()</code> and 51 <a class="xref" href="dbset_msgfile.html" title="Db::set_msgfile()">Db::set_msgfile()</a> methods 52 are used to display these messages for the application. In this case 53 the message will include a trailing <newline> character. 54 </p> 55 <p> 56 Setting <span class="bold"><strong>msgfile</strong></span> to NULL unconfigures 57 the interface. 58 </p> 59 <p> 60 Alternatively, you can use the 61 <span> 62 <a class="xref" href="envset_message_stream.html" title="DbEnv::set_message_stream()">DbEnv::set_message_stream()</a> 63 and 64 <a class="xref" href="dbset_message_stream.html" title="Db::set_message_stream()">Db::set_message_stream()</a> 65 methods to display the messages via an output stream, or the 66 </span> 67 68 <a class="xref" href="envset_msgcall.html" title="DbEnv::set_msgcall()">DbEnv::set_msgcall()</a> or 69 <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 71 not use C library FILE *'s. 72 <span>You should not mix these approaches.</span> 73 </p> 74 <p> 75 The <code class="methodname">DbEnv::set_msgfile()</code> method configures operations performed 76 using the specified <a class="link" href="env.html" title="Chapter 5. The DbEnv Handle">DbEnv</a> handle, not all 77 operations performed on the underlying database environment. 78 </p> 79 <p> 80 The <code class="methodname">DbEnv::set_msgfile()</code> method may be called at any time during the 81 life of the application. 82 </p> 83 <div class="sect2" lang="en" xml:lang="en"> 84 <div class="titlepage"> 85 <div> 86 <div> 87 <h3 class="title"><a id="id1674210"></a>Parameters</h3> 88 </div> 89 </div> 90 </div> 91 <div class="sect3" lang="en" xml:lang="en"> 92 <div class="titlepage"> 93 <div> 94 <div> 95 <h4 class="title"><a id="id1674246"></a>msgfile</h4> 96 </div> 97 </div> 98 </div> 99 <p> 100 The <span class="bold"><strong>msgfile</strong></span> parameter is a C library 101 FILE * to be used for displaying messages. 102 </p> 103 </div> 104 </div> 105 <div class="sect2" lang="en" xml:lang="en"> 106 <div class="titlepage"> 107 <div> 108 <div> 109 <h3 class="title"><a id="id1674497"></a>Class</h3> 110 </div> 111 </div> 112 </div> 113 <p> 114 <a class="link" href="env.html" title="Chapter 5. The DbEnv Handle">DbEnv</a> 115 </p> 116 </div> 117 <div class="sect2" lang="en" xml:lang="en"> 118 <div class="titlepage"> 119 <div> 120 <div> 121 <h3 class="title"><a id="id1674389"></a>See Also</h3> 122 </div> 123 </div> 124 </div> 125 <p> 126 <a class="xref" href="env.html#envlist" title="Database Environments and Related Methods">Database Environments and Related Methods</a> 127 </p> 128 </div> 129 </div> 130 <div class="navfooter"> 131 <hr /> 132 <table width="100%" summary="Navigation footer"> 133 <tr> 134 <td width="40%" align="left"><a accesskey="p" href="envset_msgcall.html">Prev</a> </td> 135 <td width="20%" align="center"> 136 <a accesskey="u" href="env.html">Up</a> 137 </td> 138 <td width="40%" align="right"> <a accesskey="n" href="envset_shm_key.html">Next</a></td> 139 </tr> 140 <tr> 141 <td width="40%" align="left" valign="top">DbEnv::set_msgcall() </td> 142 <td width="20%" align="center"> 143 <a accesskey="h" href="index.html">Home</a> 144 </td> 145 <td width="40%" align="right" valign="top"> DbEnv::set_shm_key()</td> 146 </tr> 147 </table> 148 </div> 149 </body> 150</html> 151