From 7157eee270371f62fa95982ce325fec546f58c7a Mon Sep 17 00:00:00 2001 From: Rich Prohaska <prohaska@tokutek.com> Date: Fri, 11 Jan 2008 22:37:05 +0000 Subject: [PATCH] implement Db::set_error_stream. closes #257 git-svn-id: file:///svn/tokudb@1610 c7de825b-a66e-492c-adef-691d508d4ae1 --- cxx/db.cpp | 4 ++++ include/db_cxx.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/cxx/db.cpp b/cxx/db.cpp index f0e2dd4028b..b628fa7aca3 100644 --- a/cxx/db.cpp +++ b/cxx/db.cpp @@ -166,3 +166,7 @@ int Db::associate(DbTxn *txnid, Db *secondary, int (*callback)(Db *secondary, co int ret = the_db->associate(the_db, txnid->get_DB_TXN(), secondary->get_DB(), toku_associate_callback_c, flags); return the_Env->maybe_throw_error(ret); } + +void Db::set_error_stream(std::ostream *new_error_stream) { + the_Env->set_error_stream(new_error_stream); +} diff --git a/include/db_cxx.h b/include/db_cxx.h index e4be684432c..2c3c0413454 100644 --- a/include/db_cxx.h +++ b/include/db_cxx.h @@ -127,6 +127,8 @@ class Db { int fd(int *); + void set_error_stream(std::ostream *); + /* the cxx callbacks must be public so they can be called by the c callback. But it's really private. */ int (*associate_callback_cxx)(Db *, const Dbt *, const Dbt *, Dbt*); int (*bt_compare_callback_cxx)(Db *, const Dbt *, const Dbt *); -- 2.30.9