From bf9806b07f9937eee4ab19c8b640e0bfb00247fa Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Mon, 29 Jul 2013 11:51:30 -0700 Subject: [PATCH] Log to Output Window when Visual Studio attached --- modules/ripple_app/main/ripple_Main.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/modules/ripple_app/main/ripple_Main.cpp b/modules/ripple_app/main/ripple_Main.cpp index 0753e05de..12ca64581 100644 --- a/modules/ripple_app/main/ripple_Main.cpp +++ b/modules/ripple_app/main/ripple_Main.cpp @@ -145,7 +145,20 @@ public: { if (m_shouldLog) { +#if BEAST_MSVC + if (beast_isRunningUnderDebugger ()) + { + Logger::outputDebugString (message); + } + else + { + std::cout << message.toStdString () << std::endl; + } + +#else std::cout << message.toStdString () << std::endl; + +#endif } }