| 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_ENV->log_get_config()</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="lsn.html" title="Chapter 7. The DB_LSN Handle" /> |
| 11 | <link rel="prev" href="logflush.html" title="DB_ENV->log_flush()" /> |
| 12 | <link rel="next" href="logprintf.html" title="DB_ENV->log_printf()" /> |
| 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_ENV->log_get_config()</th> |
| 22 | </tr> |
| 23 | <tr> |
| 24 | <td width="20%" align="left"><a accesskey="p" href="logflush.html">Prev</a> </td> |
| 25 | <th width="60%" align="center">Chapter 7. |
| 26 | The DB_LSN Handle |
| 27 | </th> |
| 28 | <td width="20%" align="right"> <a accesskey="n" href="logprintf.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="envlog_get_config"></a>DB_ENV->log_get_config()</h2> |
| 38 | </div> |
| 39 | </div> |
| 40 | </div> |
| 41 | <pre class="programlisting">#include <db.h> |
| 42 | |
| 43 | int |
| 44 | DB_ENV->log_get_config(DB_ENV *dbenv, u_int32_t which, int *onoffp); </pre> |
| 45 | <p> |
| 46 | The <code class="methodname">DB_ENV->log_get_config()</code> method returns whether the specified |
| 47 | <span class="bold"><strong>which</strong></span> parameter is currently set or |
| 48 | not. You can manage this value using the |
| 49 | <a class="xref" href="envlog_set_config.html" title="DB_ENV->log_set_config()">DB_ENV->log_set_config()</a> |
| 50 | method. |
| 51 | </p> |
| 52 | <p> |
| 53 | The <code class="methodname">DB_ENV->log_get_config()</code> method may be called at any time during |
| 54 | the life of the application. |
| 55 | </p> |
| 56 | <p> |
| 57 | The <code class="methodname">DB_ENV->log_get_config()</code> <span> |
| 58 | <span> |
| 59 | method returns a non-zero error value on failure and 0 on success. |
| 60 | </span> |
| 61 | |
| 62 | </span> |
| 63 | </p> |
| 64 | <div class="sect2" lang="en" xml:lang="en"> |
| 65 | <div class="titlepage"> |
| 66 | <div> |
| 67 | <div> |
| 68 | <h3 class="title"><a id="idp52883656"></a>Parameters</h3> |
| 69 | </div> |
| 70 | </div> |
| 71 | </div> |
| 72 | <div class="sect3" lang="en" xml:lang="en"> |
| 73 | <div class="titlepage"> |
| 74 | <div> |
| 75 | <div> |
| 76 | <h4 class="title"><a id="idp52885120"></a>which</h4> |
| 77 | </div> |
| 78 | </div> |
| 79 | </div> |
| 80 | <p> |
| 81 | The <span class="bold"><strong>which</strong></span> parameter is the message |
| 82 | value for which configuration is being checked. Must be set to one of the following values: |
| 83 | </p> |
| 84 | <div class="itemizedlist"> |
| 85 | <ul type="disc"> |
| 86 | <li> |
| 87 | <p><a id="log_get_config_DB_LOG_DIRECT"></a> |
| 88 | <code class="literal">DB_LOG_DIRECT</code> |
| 89 | </p> |
| 90 | <p> |
| 91 | System buffering is turned off for Berkeley DB log files to avoid double |
| 92 | caching. |
| 93 | </p> |
| 94 | </li> |
| 95 | <li> |
| 96 | <p><a id="log_get_config_DB_LOG_DSYNC"></a> |
| 97 | <code class="literal">DB_LOG_DSYNC</code> |
| 98 | </p> |
| 99 | <p> |
| 100 | Berkeley DB is configured to flush log writes to the backing disk before |
| 101 | returning from the write system call, rather than flushing log writes |
| 102 | explicitly in a separate system call, as necessary. |
| 103 | </p> |
| 104 | </li> |
| 105 | <li> |
| 106 | <p><a id="log_get_config_DB_LOG_AUTO_REMOVE"></a> |
| 107 | <code class="literal">DB_LOG_AUTO_REMOVE</code> |
| 108 | </p> |
| 109 | <p> |
| 110 | Berkeley DB automatically removes log files that are no |
| 111 | longer needed. |
| 112 | </p> |
| 113 | </li> |
| 114 | <li> |
| 115 | <p><a id="log_get_config_DB_LOG_IN_MEMORY"></a> |
| 116 | <code class="literal">DB_LOG_IN_MEMORY</code> |
| 117 | </p> |
| 118 | <p> |
| 119 | Transaction logs are maintained in memory rather than on disk. This |
| 120 | means that transactions exhibit the ACI (atomicity, consistency, and |
| 121 | isolation) properties, but not D (durability). |
| 122 | </p> |
| 123 | </li> |
| 124 | <li> |
| 125 | <p><a id="log_get_config_DB_LOG_ZERO"></a> |
| 126 | <code class="literal">DB_LOG_ZERO</code> |
| 127 | </p> |
| 128 | <p> |
| 129 | All pages of a log file are zeroed when that log file is created. |
| 130 | </p> |
| 131 | </li> |
| 132 | </ul> |
| 133 | </div> |
| 134 | </div> |
| 135 | <div class="sect3" lang="en" xml:lang="en"> |
| 136 | <div class="titlepage"> |
| 137 | <div> |
| 138 | <div> |
| 139 | <h4 class="title"><a id="idp52904944"></a>onoffp</h4> |
| 140 | </div> |
| 141 | </div> |
| 142 | </div> |
| 143 | <p> |
| 144 | The <span class="bold"><strong>onoffp</strong></span> parameter references |
| 145 | memory into which the configuration of the specified <span class="bold"><strong>which</strong></span> parameter is copied. |
| 146 | </p> |
| 147 | <p> |
| 148 | If the returned <span class="bold"><strong>onoff</strong></span> value is zero, the |
| 149 | parameter is off; otherwise, on. |
| 150 | </p> |
| 151 | </div> |
| 152 | </div> |
| 153 | <div class="sect2" lang="en" xml:lang="en"> |
| 154 | <div class="titlepage"> |
| 155 | <div> |
| 156 | <div> |
| 157 | <h3 class="title"><a id="idp52905376"></a>Class</h3> |
| 158 | </div> |
| 159 | </div> |
| 160 | </div> |
| 161 | <p> |
| 162 | <a class="link" href="env.html" title="Chapter 5. The DB_ENV Handle">DB_ENV</a> |
| 163 | </p> |
| 164 | </div> |
| 165 | <div class="sect2" lang="en" xml:lang="en"> |
| 166 | <div class="titlepage"> |
| 167 | <div> |
| 168 | <div> |
| 169 | <h3 class="title"><a id="idp52907352"></a>See Also</h3> |
| 170 | </div> |
| 171 | </div> |
| 172 | </div> |
| 173 | <p> |
| 174 | <a class="xref" href="lsn.html#loglist" title="Logging Subsystem and Related Methods">Logging Subsystem and Related Methods</a>, |
| 175 | <a class="xref" href="envlog_set_config.html" title="DB_ENV->log_set_config()">DB_ENV->log_set_config()</a> |
| 176 | </p> |
| 177 | </div> |
| 178 | </div> |
| 179 | <div class="navfooter"> |
| 180 | <hr /> |
| 181 | <table width="100%" summary="Navigation footer"> |
| 182 | <tr> |
| 183 | <td width="40%" align="left"><a accesskey="p" href="logflush.html">Prev</a> </td> |
| 184 | <td width="20%" align="center"> |
| 185 | <a accesskey="u" href="lsn.html">Up</a> |
| 186 | </td> |
| 187 | <td width="40%" align="right"> <a accesskey="n" href="logprintf.html">Next</a></td> |
| 188 | </tr> |
| 189 | <tr> |
| 190 | <td width="40%" align="left" valign="top">DB_ENV->log_flush() </td> |
| 191 | <td width="20%" align="center"> |
| 192 | <a accesskey="h" href="index.html">Home</a> |
| 193 | </td> |
| 194 | <td width="40%" align="right" valign="top"> DB_ENV->log_printf()</td> |
| 195 | </tr> |
| 196 | </table> |
| 197 | </div> |
| 198 | </body> |
| 199 | </html> |