Introduction to the logging subsystem

    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 method.

    Individual log entries are identified by log sequence numbers. Log sequence numbers are stored in an opaque object, an DB_LSN.

    The 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 method to destroy the cursor.

    There are additional methods for integrating the log subsystem with a transaction processing system:

    DB_ENV->log_flush()

    Allows applications to compare any two log sequence numbers.

    DB_ENV->log_file()

    Maps a log sequence number to the specific log file that contains it.

    DB_ENV->log_stat()

    The display utility used the DB_ENV->log_stat() method to display statistics about the log.

    The log meta-information (but not the log files themselves) may be removed using the DB_ENV->remove() method.

    For more information on the logging subsystem methods, see the section in the Berkeley DB C API Reference Guide.