Library Version 18.1.40

DbEnv::log_get_config()
Prev | Chapter 8. The DbLsn Handle | Next

## DbEnv::log_get_config()

    #include <db_cxx.h>

    int
    DbEnv::log_get_config(u_int32_t which, int *onoffp)

The `DbEnv::log_get_config()` method returns whether the specified which parameter is currently set or not. You can manage this value using the DbEnv::log_set_config() method.

The `DbEnv::log_get_config()` method may be called at any time during the life of the application.

The `DbEnv::log_get_config()` method either returns a non-zero error value or throws an exception that encapsulates a non-zero error value on failure, and returns 0 on success.

### Parameters

#### which

The which parameter is the message value for which configuration is being checked. Must be set to one of the following values:

- `DB_LOG_EXT_FILE`

  Enables full logging of external file data.

- `DB_LOG_DIRECT`

  System buffering is turned off for Berkeley DB log files to avoid double caching.

- `DB_LOG_DSYNC`

  Berkeley DB is configured to flush log writes to the backing disk before returning from the write system call, rather than flushing log writes explicitly in a separate system call, as necessary.

- `DB_LOG_AUTO_REMOVE`

  Berkeley DB automatically removes log files that are no longer needed.

- `DB_LOG_IN_MEMORY`

  Transaction logs are maintained in memory rather than on disk. This means that transactions exhibit the ACI (atomicity, consistency, and isolation) properties, but not D (durability).

- `DB_LOG_NOSYNC`

  The transaction log is not flushed from from the operating system cache to stable storage when the logging system switches log files or a durable transaction commits. This means that transactions exhibit the ACI (atomicity, consistency, and isolation) properties, but only partially support D (durability); that is, database integrity will be maintained if the application fails and the environment is recovered, but not if the system fails. All database files must be verified and/or restored from a replication group master or archival backup after system failure.

- `DB_LOG_ZERO`

  All pages of a log file are zeroed when that log file is created.

#### onoffp

The onoffp parameter references memory into which the configuration of the specified which parameter is copied.

If the returned onoff value is zero, the parameter is off; otherwise, on.

### Class

DbEnv

### See Also

Logging Subsystem and Related Methods, DbEnv::log_set_config()

Prev | Up | Next
DbEnv::log_flush() | Home | DbEnv::log_printf()