DB->set_msgfile API Ref

#include <db.h>

void DB->set_msgfile(DB *db, FILE *msgfile);

void DB->get_msgfile(DB *db, FILE **msgfilep);


Description: DB->set_msgfile

There are interfaces in the Berkeley DB library which either directly output informational messages or statistical information, or configure the library to output such messages when performing other operations, for example, DB_ENV->set_verbose and DB_ENV->stat_print.

The DB_ENV->set_msgfile and DB->set_msgfile methods are used to display these messages for the application. In this case the message will include a trailing <newline> character.

Setting msgfile to NULL unconfigures the interface.

Alternatively, you can use the DB_ENV->set_msgcall or DB->set_msgcall methods to capture the additional error information in a way that does not use C library FILE *'s.

For DB handles opened inside of Berkeley DB environments, calling the DB->set_msgfile method affects the entire environment and is equivalent to calling the DB_ENV->set_msgfile method.

The DB->set_msgfile method configures operations performed using the specified DB handle, not all operations performed on the underlying database.

The DB->set_msgfile method may be called at any time during the life of the application.

Parameters
msgfile

Description: DB->get_msgfile

The DB->get_msgfile method returns the FILE *.

The DB->get_msgfile method may be called at any time during the life of the application.

The DB->get_msgfile method returns a non-zero error value on failure and 0 on success.

Parameters
msgfilep


Class DB
See Also Databases and Related Methods

APIRef

Copyright (c) 1996,2008 Oracle. All rights reserved.