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