Library Version 18.1.40

DB_ENV->msg()
Prev | Chapter 5. The DB_ENV Handle | Next

## DB_ENV->msg()

    #include <db.h>

    void
    DB_ENV->msg(DB_ENV *dbenv, const char *fmt, ...);

The `DB_ENV->msg()` and DB->msg() methods provide informational messaging functionality for applications written using the Berkeley DB library.

The DB->msg() and DB_ENV->msg() methods constructs an informational message consisting of the following elements:

- An optional prefix string

  If no informational callback function has been set using the DB_ENV->set_msgcall() method, any prefix string specified using the DB_ENV->set_msgpfx() method.

- An optional printf-style message

  The supplied message fmt, if non-NULL, in which the ANSI C X3.159-1989 (ANSI C) printf function specifies how subsequent parameters are converted for output.

This constructed informational message is then handled as follows:

- If an informational callback function has been set (see DB->set_msgcall() and DB_ENV->set_msgcall() ), that function is called with two parameters: any prefix string specified (see DB->set_msgpfx() and DB_ENV->set_msgpfx() ) and the informational message.

- If a C library FILE * has been set (see DB->set_msgfile() and DB_ENV->set_msgfile() ), the informational message is written to that output stream.

- If none of these output options have been configured, the message is written to stdout, the standard output stream.

### Note

The total length of the message written by this method, including the prefix string, can be no longer than 4096.

### Parameters

#### fmt

The fmt parameter is an optional printf-style message to display.

### Class

DB_ENV

### See Also

Database Environments and Related Methods

Prev | Up | Next
DB_ENV->lsn_reset() | Home | DB_ENV->open()