Table of Contents
The Logging subsystem is the logging facility used by Berkeley DB. It is largely Berkeley DB-specific, although it is potentially useful outside of the Berkeley DB package for applications wanting write-ahead logging support. Applications wanting to use the log for purposes other than logging file modifications based on a set of open file descriptors will almost certainly need to make source code modifications to the Berkeley DB code base.
A log can be shared by any number of threads of control. The DB_ENV->open() method is used to open a log. When the log is no longer in use, it should be closed using the DB_ENV->close() method.
Individual log entries are identified by log sequence numbers. Log sequence numbers are stored in an opaque object, an DB_LSN.
The DB_ENV->log_cursor() method is used to allocate a log cursor. Log cursors have two methods: DB_LOGC->get() method to retrieve log records from the log, and DB_LOGC->close() method to destroy the cursor.
There are additional methods for integrating the log subsystem with a transaction processing system:
For more information on the logging subsystem methods, see the Logging Subsystem and Related Methods section in the Berkeley DB C API Reference Guide.