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