DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

Db::set_msgcall

API Ref

#include <db_cxx.h>

void Db::set_msgcall(void (*db_msgcall_fcn)(const DbEnv *dbenv, char *msg));


Description: Db::set_msgcall

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, DbEnv::set_verbose and DbEnv::stat_print.

The DbEnv::set_msgcall and Db::set_msgcall methods are used to pass these messages to the application, and Berkeley DB will call db_msgcall_fcn with each message. It is up to the db_msgcall_fcn function to display the message in an appropriate manner.

Setting db_msgcall_fcn to NULL unconfigures the callback interface.

Alternatively, you can use the DbEnv::set_message_stream and Db::set_message_stream methods to display the messages via an output stream, or the Db::set_msgfile or DbEnv::set_msgfile methods to display the messages via a C library FILE *.

For Db handles opened inside of Berkeley DB environments, calling the Db::set_msgcall method affects the entire environment and is equivalent to calling the DbEnv::set_msgcall method.

The Db::set_msgcall method may be called at any time during the life of the application.

Parameters

db_msgcall_fcn
The db_msgcall_fcn parameter is the application-specified message reporting function. The function takes two parameters:
dbenv
The dbenv parameter is the enclosing database environment.
msg
The msg parameter is the message string.

Class

Db

See Also

Databases and Related Methods

APIRef

Copyright (c) 1996-2005 Sleepycat Software, Inc. - All rights reserved.