X-Git-Url: http://developer.intra2net.com/git/?p=libt2n;a=blobdiff_plain;f=src%2Fsocket_wrapper.cpp;h=7bbe20c09cd6e0750619c2e12f6dbbde8493b90d;hp=313f6ca4b3c818635b95d024a9c1e38787fe00d6;hb=238ad35f4e3b6516d4ba7611b540a0edeea71427;hpb=487afb796c9547de4353c503939b6666f8e0877d diff --git a/src/socket_wrapper.cpp b/src/socket_wrapper.cpp index 313f6ca..7bbe20c 100644 --- a/src/socket_wrapper.cpp +++ b/src/socket_wrapper.cpp @@ -25,6 +25,16 @@ namespace libt2n { +/// set logging for coming and current connections +void BasicSocketWrapper::set_logging(std::ostream *_logstream, log_level_values _log_level) +{ + ConnectionWrapper::set_logging(_logstream,_log_level); + + if (connection_established()) + get_connection()->set_logging(_logstream,_log_level); +} + + /// return active connection, create new tcp or unix connection if not existing client_connection* BasicSocketWrapper::get_connection(void) { @@ -101,7 +111,7 @@ client_connection* ReconnectIgnoreFailureSocketWrapper::get_connection(void) return tmp; } -/// try to execute the command, may +/// try to execute the command, may ignore the command if server not available bool ReconnectIgnoreFailureSocketWrapper::handle(command_client* stubBase, boost::function< void() > f) { if (!connection_established())