[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Quieter debug messages

From: Marc Sutton <marc_at_codev.co.uk>
Date: Fri, 26 Sep 2008 14:51:41 +0100

Would someone consider applying the following patch to Tortoise? At the
moment every time the crash reporter is started or stopped (which
happens quite often) then a message is displayed on the system debug output.

That can be quite distracting when you are trying to debug another
application. The patch just restricts the output to only occurring in
debug builds of Tortoise. An alternative would be to simply delete these
OutputDebugString statements if they are no longer being used.

Thanks,

-- 
Marc Sutton
MD, Codev Ltd
+44 797 186 2965
www.codev.co.uk

Index: CrashHandler.cpp
===================================================================
--- CrashHandler.cpp (revision 14105)
+++ CrashHandler.cpp (working copy)
@@ -88,7 +88,9 @@
 {
         if (m_pid == 0)
                 return;
+#ifdef _DEBUG
         OutputDebugString("::Install\n");
+#endif
         if (m_installed) {
                 Uninstall();
         }
@@ -111,7 +113,9 @@
 
 void CCrashHandler::Uninstall()
 {
+#ifdef _DEBUG
         OutputDebugString("Uninstall\n");
+#endif
    // reset exception callback (to previous filter, which can be NULL)
    SetUnhandledExceptionFilter(m_oldFilter);
    m_installed = false;
Index: CrashRpt.cpp
===================================================================
--- CrashRpt.cpp (revision 14105)
+++ CrashRpt.cpp (working copy)
@@ -32,7 +32,9 @@
 
 CRASHRPTAPI LPVOID InstallEx(LPGETLOGFILE pfn, LPCTSTR lpcszTo, LPCTSTR lpcszSubject, BOOL bUseUI)
 {
+#ifdef _DEBUG
         OutputDebugString("InstallEx\n");
+#endif
    CCrashHandler *pImpl = CCrashHandler::GetInstance();
    CRASH_ASSERT(pImpl);
    pImpl->Install(pfn, lpcszTo, lpcszSubject, bUseUI);

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_tortoisesvn.tigris.org
For additional commands, e-mail: dev-help_at_tortoisesvn.tigris.org
Received on 2008-09-26 15:56:46 CEST

This is an archived mail posted to the TortoiseSVN Dev mailing list.