libt2n, arnied: (gerd) set logging on existing connections too, show t2n-debugging...
[libt2n] / src / socket_wrapper.cpp
index 313f6ca..7bbe20c 100644 (file)
 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())