From c81308b2a2874dd45fd33e3d6d166906e115e0d0 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Sun, 11 Aug 2013 14:40:43 -0300 Subject: [PATCH] redirect log to bitcoin/util.h printf --- libtorrent/src/session_impl.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/libtorrent/src/session_impl.cpp b/libtorrent/src/session_impl.cpp index 08a1d6c8..d9e6963f 100644 --- a/libtorrent/src/session_impl.cpp +++ b/libtorrent/src/session_impl.cpp @@ -32,6 +32,8 @@ POSSIBILITY OF SUCH DAMAGE. #include "libtorrent/pch.hpp" +#include "../../src/util.h" + #include #include #include @@ -740,7 +742,7 @@ namespace aux { { #if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING m_logger = create_log("main_session", listen_port(), false); - session_log("log created"); + session_log("session_impl::start_session log created"); #endif error_code ec; @@ -4942,7 +4944,9 @@ retry: va_end(v); char buf[450]; snprintf(buf, sizeof(buf), "%s: %s\n", time_now_string(), usr); - (*m_logger) << buf; + // printf is the bitcoin/util.h logger + printf(buf); + //(*m_logger) << buf; } #endif @@ -5411,7 +5415,7 @@ retry: #if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING m_logger = create_log("main_session", listen_port(), false); - session_log("log created"); + session_log("session_impl::listen_on log created"); #endif } @@ -6495,7 +6499,9 @@ retry: va_end(v); char buf[1280]; snprintf(buf, sizeof(buf), "%s: %s\n", time_now_string(), usr); - (*m_ses.m_logger) << buf; + // printf is the bitcoin/util.h logger + printf(buf); + //(*m_ses.m_logger) << buf; } #endif }}