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