1<!--$Id: log.so,v 1.5 2003/10/18 19:16:19 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 Reference Guide: Release 4.0: log_XXX</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><b><dl><dt>Berkeley DB Reference Guide:<dd>Upgrading Berkeley DB Applications</dl></b></td> 13<td align=right><a href="/upgrade.4.0/lock.html"><img src="/images/prev.gif" alt="Prev"></a><a href="/toc.html"><img src="/images/ref.gif" alt="Ref"></a><a href="/upgrade.4.0/mp.html"><img src="/images/next.gif" alt="Next"></a> 14</td></tr></table> 15<p align=center><b>Release 4.0: log_XXX</b></p> 16<p>The C API for the Berkeley DB Logging subsystem was reworked in the 4.0 17release as follows:</p> 18<table border=1 align=center> 19<tr><th>Historic functional interface</th><th>Berkeley DB 4.X method</th></tr> 20<tr><td>log_archive</td><td><a href="/api_c/log_archive.html">DB_ENV->log_archive</a></td></tr> 21<tr><td>log_file</td><td><a href="/api_c/log_file.html">DB_ENV->log_file</a></td></tr> 22<tr><td>log_flush</td><td><a href="/api_c/log_flush.html">DB_ENV->log_flush</a></td></tr> 23<tr><td>log_get</td><td><a href="/api_c/log_cursor.html">DB_ENV->log_cursor</a>, <a href="/api_c/logc_get.html">DB_LOGC->get</a>, <a href="/api_c/logc_close.html">DB_LOGC->close</a></td></tr> 24<tr><td>log_put</td><td><a href="/api_c/log_put.html">DB_ENV->log_put</a></td></tr> 25<tr><td>log_register</td><td>DB_ENV->log_register</td></tr> 26<tr><td>log_stat</td><td><a href="/api_c/log_stat.html">DB_ENV->log_stat</a></td></tr> 27<tr><td>log_unregister</td><td>DB_ENV->log_unregister</td></tr> 28</table> 29<p>Applications calling any of these functions should update their calls 30to use the enclosing <a href="/api_c/env_class.html">DB_ENV</a> handle's method (in all cases other 31than the log_get call, this is easily done as the first argument to the 32existing call is the correct handle to use).</p> 33<p>Application calls to the historic log_get function must be replaced 34with the creation of a log file cursor (a <a href="/api_c/logc_class.html">DB_LOGC</a> object), using 35the <a href="/api_c/log_cursor.html">DB_ENV->log_cursor</a> method, calls to the <a href="/api_c/logc_get.html">DB_LOGC->get</a> method to retrieve log 36records and calls to the <a href="/api_c/logc_close.html">DB_LOGC->close</a> method to destroy the cursor. It 37may also be possible to simplify some applications. In previous 38releases of Berkeley DB, the DB_CURRENT, DB_NEXT, and DB_PREV flags to the 39log_get function could not be used by a free-threaded <a href="/api_c/env_class.html">DB_ENV</a> 40handle. If their <a href="/api_c/env_class.html">DB_ENV</a> handle was free-threaded, applications 41had to create an additional, unique environment handle by separately 42calling <a href="/api_c/env_open.html">DB_ENV->open</a> without specifying <a href="/api_c/env_open.html#DB_THREAD">DB_THREAD</a>. This 43is no longer an issue in the log cursor interface, and applications may 44be able to remove the now unnecessary creation of the additional 45<a href="/api_c/env_class.html">DB_ENV</a> object.</p> 46<p>Finally, the <a href="/api_c/log_stat.html">DB_ENV->log_stat</a> call has been changed in the 4.0 release 47to take a flags argument. To leave their historic behavior unchanged, 48applications should add a final argument of 0 to any calls made to 49<a href="/api_c/log_stat.html">DB_ENV->log_stat</a>.</p> 50<table width="100%"><tr><td><br></td><td align=right><a href="/upgrade.4.0/lock.html"><img src="/images/prev.gif" alt="Prev"></a><a href="/toc.html"><img src="/images/ref.gif" alt="Ref"></a><a href="/upgrade.4.0/mp.html"><img src="/images/next.gif" alt="Next"></a> 51</td></tr></table> 52<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font> 53</body> 54</html> 55