OSDN Git Service

PATCH: [ 1679196 ] Cleanup logfile class usage
authorKimmo Varis <kimmov@gmail.com>
Tue, 13 Mar 2007 16:50:06 +0000 (16:50 +0000)
committerKimmo Varis <kimmov@gmail.com>
Tue, 13 Mar 2007 16:50:06 +0000 (16:50 +0000)
15 files changed:
Src/Changes.txt
Src/Common/LogFile.cpp
Src/Common/LogFile.h
Src/DiffWrapper.cpp
Src/DirActions.cpp
Src/DirDoc.cpp
Src/DirScan.cpp
Src/FolderCmp.cpp
Src/MainFrm.cpp
Src/Merge.cpp
Src/Merge.h
Src/MergeDoc.cpp
Src/Plugins.cpp
Src/StdAfx.cpp
Src/StdAfx.h

index 86c2ede..155f6bc 100644 (file)
@@ -2,6 +2,12 @@ Src\Changes.txt
 Add new items to top.
 (This summarizes all changes to all files under Src, including Src\Languages.)
 
+2007-03-13 Kimmo
+ PATCH: [ 1679196 ] Cleanup logfile class usage
+  Src: DiffWrapper.cpp DirActions.cpp DirDoc.cpp DirScan.cpp FolderCmp.cpp MainFrm.cpp
+   Merge.cpp Merge.h MergeDoc.cpp Plugins.cpp StdAfx.cpp StdAfx.h
+  Src/Common: LogFile.cpp LogFile.h
+
 2007-03-12 Kimmo
  Remove unneeded include lines
   Src: DirDoc.cpp
index 37a557d..fe36b46 100644 (file)
@@ -4,7 +4,7 @@
  * @brief Implementation file for CLogFile
  *
  */
-// RCS ID line follows -- this is updated by CVS
+// ID line follows -- this is updated by SVN
 // $Id$
 
 #include "stdafx.h"
@@ -17,14 +17,10 @@ static char THIS_FILE[]=__FILE__;
 #define new DEBUG_NEW
 #endif
 
-/**
- * @brief Global name for mutes protecting log file access.
- */
+/** @brief Global name for mutes protecting log file access. */
 static const TCHAR MutexName[] = _T("WINMERGE_LOG_MUTEX");
 
-/**
- * @brief Constant for Megabyte.
- */
+/** @brief Constant for Megabyte. */
 static const int MEGA = 1024 * 1024;
 
 /**
@@ -334,3 +330,9 @@ LPCTSTR CLogFile::GetPrefix(UINT level) const
        }
        return str;
 }
+
+/** @brief Report DeleteFile() failure to Log */
+UINT CLogFile::DeleteFileFailed(LPCTSTR path)
+{
+       return Write(CLogFile::LERROR|CLogFile::LOSERROR|CLogFile::LDEBUG, _T("DeleteFile(%s) failed: "), path);
+}
index de85803..5071f64 100644 (file)
@@ -4,7 +4,7 @@
  * @brief Declaration file for CLogFile
  *
  */
-// RCS ID line follows -- this is updated by CVS
+// ID line follows -- this is updated by SVN
 // $Id$
 
 #if !defined(AFX_LOGFILE_H__803A3641_FE03_11D0_95CD_444553540000__INCLUDED_)
@@ -66,6 +66,8 @@ public:
        UINT Write(UINT level, LPCTSTR pszFormat, ...);
        UINT Write(UINT level, DWORD idFormatString, ...);
 
+       UINT DeleteFileFailed(LPCTSTR path);
+
        void SetMaxLogSize(DWORD dwMax) { m_nMaxSize = dwMax; }
        CString GetPath() const { return m_strLogPath; }
 
index 3a58f17..70c99a6 100644 (file)
@@ -51,7 +51,6 @@ static char THIS_FILE[] = __FILE__;
 #endif
 
 extern int recursive;
-extern CLogFile gLog;
 
 static void FreeDiffUtilsScript(struct change * & script);
 static void CopyTextStats(const file_data * inf, FileTextStats * myTextStats);
index fc0fe47..9e59dfc 100644 (file)
@@ -40,8 +40,6 @@
 static char THIS_FILE[] = __FILE__;
 #endif
 
-extern CLogFile gLog;
-
 /**
  * @brief Ask user a confirmation for copying item(s).
  * Shows a confirmatino dialog for copy operation. Depending ont item count
index 2f23b75..ccaf621 100644 (file)
@@ -51,8 +51,6 @@
 static char THIS_FILE[] = __FILE__;
 #endif
 
-extern CLogFile gLog;
-
 /////////////////////////////////////////////////////////////////////////////
 // CDirDoc
 
@@ -309,7 +307,7 @@ void CDirDoc::Rescan()
 
        m_statusCursor = new CustomStatusCursor(0, IDC_APPSTARTING, LoadResString(IDS_STATUS_RESCANNING));
 
-       gLog.Write(CLogFile::LNOTICE, _T("Starting directory scan:\n\tLeft: %s\n\tRight: %s\n"),
+       GetLog()->Write(CLogFile::LNOTICE, _T("Starting directory scan:\n\tLeft: %s\n\tRight: %s\n"),
                        m_pCtxt->GetLeftPath(), m_pCtxt->GetRightPath());
        m_pCompareStats->Reset();
        m_pDirView->StartCompare(m_pCompareStats);
@@ -709,7 +707,7 @@ void CDirDoc::UpdateChangedItem(PathContext &paths,
  */
 void CDirDoc::CompareReady()
 {
-       gLog.Write(CLogFile::LNOTICE, _T("Directory scan complete\n"));
+       GetLog()->Write(CLogFile::LNOTICE, _T("Directory scan complete\n"));
 
        // finish the cursor (the hourglass/pointer combo) we had open during display
        delete m_statusCursor;
@@ -851,7 +849,7 @@ BOOL CDirDoc::SaveModified()
  */
 void CDirDoc::AbortCurrentScan()
 {
-       gLog.Write(CLogFile::LNOTICE, _T("Dircompare aborted!"));
+       GetLog()->Write(CLogFile::LNOTICE, _T("Dircompare aborted!"));
        m_diffThread.Abort();
 }
 
index 1983b5c..2c77bed 100644 (file)
@@ -3,13 +3,15 @@
  *
  *  @brief Implementation of DirScan (q.v.) and helper functions
  */ 
-// RCS ID line follows -- this is updated by CVS
+// ID line follows -- this is updated by SVN
 // $Id$
 
 #include "stdafx.h"
 #include <shlwapi.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+#include "Merge.h"
+#include "LogFile.h"
 #include "DirScan.h"
 #include "CompareStats.h"
 #include "common/unicoder.h"
@@ -17,7 +19,6 @@
 #include "DiffWrapper.h"
 #include "FolderCmp.h"
 #include "FileFilterHelper.h"
-#include "logfile.h"
 #include "paths.h"
 #include "FileTransform.h"
 #include "codepage.h"
@@ -700,7 +701,7 @@ static void StoreDiffData(DIFFITEM &di, CDiffContext * pCtxt,
                }
        }
 
-       gLog.Write
+       GetLog()->Write
        (
                CLogFile::LCOMPAREDATA, _T("name=<%s>, leftdir=<%s>, rightdir=<%s>, code=%d"),
                (LPCTSTR)di.sLeftFilename, (LPCTSTR)_T("di.left.spath"), (LPCTSTR)_T("di.right.spath"), di.diffcode
@@ -757,7 +758,7 @@ static void AddToList(const CString & sLeftDir, const CString & sRightDir, const
 
        di.diffcode = code;
 
-       gLog.Write
+       GetLog()->Write
        (
                CLogFile::LCOMPAREDATA, _T("name=<%s>, leftdir=<%s>, rightdir=<%s>, code=%d"),
                (LPCTSTR)di.sLeftFilename, (LPCTSTR)_T("di.left.spath"), (LPCTSTR)_T("di.right.spath"), code
index ed18fa0..0ff3b63 100644 (file)
@@ -8,6 +8,8 @@
 \r
 \r
 #include "stdafx.h"\r
+#include "LogFile.h"\r
+#include "Merge.h"\r
 #include "paths.h"\r
 #include "FilterList.h"\r
 #include "DiffContext.h"\r
@@ -205,13 +207,13 @@ exitPrepAndCompare:
        m_diffFileData.Reset();\r
        // delete the temp files after comparison\r
        if (filepathTransformed1 != filepathUnpacked1)\r
-               VERIFY(::DeleteFile(filepathTransformed1) || gLog::DeleteFileFailed(filepathTransformed1));\r
+               VERIFY(::DeleteFile(filepathTransformed1) || GetLog()->DeleteFileFailed(filepathTransformed1));\r
        if (filepathTransformed2 != filepathUnpacked2)\r
-               VERIFY(::DeleteFile(filepathTransformed2) || gLog::DeleteFileFailed(filepathTransformed2));\r
+               VERIFY(::DeleteFile(filepathTransformed2) || GetLog()->DeleteFileFailed(filepathTransformed2));\r
        if (filepathUnpacked1 != filepath1)\r
-               VERIFY(::DeleteFile(filepathUnpacked1) || gLog::DeleteFileFailed(filepathUnpacked1));\r
+               VERIFY(::DeleteFile(filepathUnpacked1) || GetLog()->DeleteFileFailed(filepathUnpacked1));\r
        if (filepathUnpacked2 != filepath2)\r
-               VERIFY(::DeleteFile(filepathUnpacked2) || gLog::DeleteFileFailed(filepathUnpacked2));\r
+               VERIFY(::DeleteFile(filepathUnpacked2) || GetLog()->DeleteFileFailed(filepathUnpacked2));\r
        return code;\r
 }\r
 \r
index 0b244d3..6435a94 100644 (file)
@@ -23,7 +23,7 @@
  *
  * @brief Implementation of the CMainFrame class
  */
-// RCS ID line follows -- this is updated by CVS
+// ID line follows -- this is updated by SVN
 // $Id$
 
 #include "stdafx.h"
@@ -44,7 +44,6 @@
 #include "LocationView.h"
 #include "SyntaxColors.h"
 
-#include "diff.h"
 #include "coretools.h"
 #include "Splash.h"
 #include "PropLineFilter.h"
@@ -52,7 +51,6 @@
 #include "paths.h"
 #include "WaitStatusCursor.h"
 #include "PatchTool.h"
-#include "FileTransform.h"
 #include "Plugins.h"
 #include "SelectUnpackerDlg.h"
 #include "files.h"
@@ -89,8 +87,6 @@
 static char THIS_FILE[] = __FILE__;
 #endif
 
-extern CLogFile gLog;
-
 static void LoadToolbarImageList(UINT nIDResource, CImageList& ImgList);
 
 /////////////////////////////////////////////////////////////////////////////
@@ -213,20 +209,6 @@ CMainFrame::CMainFrame()
        // uncomment this when the GUI allows to toggle the mode
 //     g_bPredifferMode = theApp.GetProfileInt(_T("Settings"), _T("PredifferMode"), PLUGIN_MANUAL);
 
-       // TODO: read preference for logging
-
-       int logging = GetOptionsMgr()->GetInt(OPT_LOGGING);
-       if (logging > 0)
-       {
-               gLog.EnableLogging(TRUE);
-               gLog.SetFile(_T("WinMerge.log"));
-
-               if (logging == 1)
-                       gLog.SetMaskLevel(CLogFile::LALL);
-               else if (logging == 2)
-                       gLog.SetMaskLevel(CLogFile::LERROR | CLogFile::LWARNING);
-       }
-
        m_pSyntaxColors = new SyntaxColors();
        if (m_pSyntaxColors)
                m_pSyntaxColors->Initialize(GetOptionsMgr());
@@ -244,7 +226,7 @@ CMainFrame::CMainFrame()
 
 CMainFrame::~CMainFrame()
 {
-       gLog.EnableLogging(FALSE);
+       GetLog()->EnableLogging(FALSE);
 
        // Delete all temporary folders belonging to this process
        GetClearTempPath(NULL, NULL);
@@ -1060,7 +1042,7 @@ BOOL CMainFrame::DoFileOpen(LPCTSTR pszLeft /*=NULL*/, LPCTSTR pszRight /*=NULL*
 
        if (1)
        {
-               gLog.Write(_T("### Begin Comparison Parameters #############################\r\n")
+               GetLog()->Write(_T("### Begin Comparison Parameters #############################\r\n")
                                  _T("\tLeft: %s\r\n")
                                  _T("\tRight: %s\r\n")
                                  _T("\tRecurse: %d\r\n")
@@ -1091,7 +1073,7 @@ BOOL CMainFrame::DoFileOpen(LPCTSTR pszLeft /*=NULL*/, LPCTSTR pszRight /*=NULL*
                                        break;
                                if (strLeft.Find(path) == 0)
                                {
-                                       VERIFY(::DeleteFile(strLeft) || gLog::DeleteFileFailed(strLeft));
+                                       VERIFY(::DeleteFile(strLeft) || GetLog()->DeleteFileFailed(strLeft));
                                }
                                SysFreeString(Assign(strLeft, piHandler->GetDefaultName(m_hWnd, strLeft)));
                                strLeft.Insert(0, '\\');
@@ -1107,7 +1089,7 @@ BOOL CMainFrame::DoFileOpen(LPCTSTR pszLeft /*=NULL*/, LPCTSTR pszRight /*=NULL*
                                                break;;
                                        if (strRight.Find(path) == 0)
                                        {
-                                               VERIFY(::DeleteFile(strRight) || gLog::DeleteFileFailed(strRight));
+                                               VERIFY(::DeleteFile(strRight) || GetLog()->DeleteFileFailed(strRight));
                                        }
                                        SysFreeString(Assign(strRight, piHandler->GetDefaultName(m_hWnd, strRight)));
                                        strRight.Insert(0, '\\');
@@ -1172,7 +1154,7 @@ BOOL CMainFrame::DoFileOpen(LPCTSTR pszLeft /*=NULL*/, LPCTSTR pszRight /*=NULL*
                        // Anything that can go wrong inside InitCompare() will yield an
                        // exception. There is no point in checking return value.
                        pDirDoc->InitCompare(paths, bRecurse, pTempPathContext);
-                       gLog.Write(CLogFile::LNOTICE, _T("Open dirs: Left: %s\n\tRight: %s."),
+                       GetLog()->Write(CLogFile::LNOTICE, _T("Open dirs: Left: %s\n\tRight: %s."),
                                strLeft, strRight);
 
                        pDirDoc->SetReadOnly(TRUE, bROLeft);
@@ -1187,7 +1169,7 @@ BOOL CMainFrame::DoFileOpen(LPCTSTR pszLeft /*=NULL*/, LPCTSTR pszRight /*=NULL*
        }
        else
        {
-               gLog.Write(CLogFile::LNOTICE, _T("Open files: Left: %s\n\tRight: %s."),
+               GetLog()->Write(CLogFile::LNOTICE, _T("Open files: Left: %s\n\tRight: %s."),
                        strLeft, strRight);
                
                FileLocation filelocLeft(strLeft);
@@ -1657,7 +1639,7 @@ void CMainFrame::ActivateFrame(int nCmdShow)
        dsk_rc.bottom = dsk_rc.top + ::GetSystemMetrics(SM_CYVIRTUALSCREEN);
        if (nCmdShow != SW_MINIMIZE && theApp.GetProfileInt(_T("Settings"), _T("MainMax"), FALSE))
        {
-               CMDIFrameWnd::ActivateFrame(SW_MAXIMIZE);       
+               CMDIFrameWnd::ActivateFrame(SW_MAXIMIZE);
        }
        else if (rc.Width() != 0 && rc.Height() != 0)
        {
@@ -2097,7 +2079,7 @@ void CMainFrame::OnDropFiles(HDROP dropInfo)
                files[1] = files[0];
        }
 
-       gLog.Write(CLogFile::LNOTICE, _T("D&D open: Left: %s\n\tRight: %s."),
+       GetLog()->Write(CLogFile::LNOTICE, _T("D&D open: Left: %s\n\tRight: %s."),
                files[0], files[1]);
 
        // Check if they dropped a project file
@@ -2322,7 +2304,6 @@ static void LoadConfigLog(CConfigLog & configLog, COptionsMgr * options,
        LoadConfigBoolSetting(&configLog.m_miscSettings.bAutomaticRescan, options, OPT_AUTOMATIC_RESCAN, cfgdir);
        LoadConfigBoolSetting(&configLog.m_miscSettings.bAllowMixedEol, options, OPT_ALLOW_MIXED_EOL, cfgdir);
        LoadConfigBoolSetting(&configLog.m_miscSettings.bScrollToFirst, options, OPT_SCROLL_TO_FIRST, cfgdir);
-//     LoadConfigBoolSetting(&configLog.m_miscSettings.bBackup, options, OPT_CREATE_BACKUPS, cfgdir);
        LoadConfigBoolSetting(&configLog.m_miscSettings.bViewWhitespace, options, OPT_VIEW_WHITESPACE, cfgdir);
        LoadConfigBoolSetting(&configLog.m_miscSettings.bMovedBlocks, options, OPT_CMP_MOVED_BLOCKS, cfgdir);
        LoadConfigBoolSetting(&configLog.m_miscSettings.bShowLinenumbers, options, OPT_VIEW_LINENUMBERS, cfgdir);
index db9c73e..58bfb03 100644 (file)
@@ -24,7 +24,7 @@
  * @brief Defines the class behaviors for the application.
  *
  */
-// RCS ID line follows -- this is updated by CVS
+// ID line follows -- this is updated by SVN
 // $Id$
 
 #include "stdafx.h"
@@ -89,8 +89,6 @@ BEGIN_MESSAGE_MAP(CMergeApp, CWinApp)
        ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
 END_MESSAGE_MAP()
 
-extern CLogFile gLog;
-
 static void AddEnglishResourceHook();
 
 /**
@@ -109,12 +107,27 @@ struct ArgSetting
        LPCTSTR WinMergeOptionName;
 };
 
+/**
+ * @brief Get Options Manager.
+ * @return Pointer to OptionsMgr.
+ */
 COptionsMgr * GetOptionsMgr()
 {
        CMergeApp *pApp = static_cast<CMergeApp *>(AfxGetApp());
        return pApp->GetMergeOptionsMgr();
 }
 
+/**
+ * @brief Get Log.
+ * @return Pointer to Log.
+ */
+CLogFile * GetLog()
+{
+       CMergeApp *pApp = static_cast<CMergeApp *>(AfxGetApp());
+       return pApp->GetMergeLog();
+}
+
+
 /////////////////////////////////////////////////////////////////////////////
 // CMergeApp construction
 
@@ -126,6 +139,7 @@ CMergeApp::CMergeApp() :
 , m_nLastCompareResult(0)
 , m_bNonInteractive(false)
 , m_pOptions(NULL)
+, m_pLog(NULL)
 {
        // add construction code here,
        // Place all significant initialization in InitInstance
@@ -136,6 +150,7 @@ CMergeApp::~CMergeApp()
 {
        delete m_pOptions;
        delete m_pLangDlg;
+       delete m_pLog;
 }
 /////////////////////////////////////////////////////////////////////////////
 // The one and only CMergeApp object
@@ -195,6 +210,20 @@ BOOL CMergeApp::InitInstance()
        m_pOptions = new CRegOptionsMgr;
        OptionsInit(); // Implementation in OptionsInit.cpp
 
+       m_pLog = new CLogFile();
+
+       int logging = GetOptionsMgr()->GetInt(OPT_LOGGING);
+       if (logging > 0)
+       {
+               m_pLog->EnableLogging(TRUE);
+               m_pLog->SetFile(_T("WinMerge.log"));
+
+               if (logging == 1)
+                       m_pLog->SetMaskLevel(CLogFile::LALL);
+               else if (logging == 2)
+                       m_pLog->SetMaskLevel(CLogFile::LERROR | CLogFile::LWARNING);
+       }
+
        // Parse command-line arguments.
        MergeCmdLineInfo cmdInfo(*__targv);
        ParseCommandLine(cmdInfo);
@@ -273,7 +302,7 @@ BOOL CMergeApp::InitInstance()
 
        // Initialize i18n (multiple language) support
 
-       m_pLangDlg->SetLogFile(&gLog);
+       m_pLangDlg->SetLogFile(GetLog());
        m_pLangDlg->InitializeLanguage();
 
        AddEnglishResourceHook(); // Use English string when l10n (foreign) string missing
index bd533fd..fe437db 100644 (file)
@@ -23,7 +23,7 @@
  * @brief main header file for the MERGE application
  *
  */
-// RCS ID line follows -- this is updated by CVS
+// ID line follows -- this is updated by SVN
 // $Id$
 
 #if !defined(AFX_MERGE_H__BBCD4F88_34E4_11D1_BAA6_00A024706EDC__INCLUDED_)
@@ -43,6 +43,7 @@ class CAssureScriptsForThread;
 class CMainFrame;
 class CLanguageSelect;
 class MergeCmdLineInfo;
+class CLogFile;
 
 /////////////////////////////////////////////////////////////////////////////
 // CMergeApp:
@@ -78,6 +79,8 @@ public:
        void OptionsInit();
        void ResetOptions() { OptionsInit(); }
 
+       CLogFile * GetMergeLog() { return m_pLog; }
+
 // Implementation
 protected:
 
@@ -112,6 +115,7 @@ protected:
 private:
        CRegOptionsMgr *m_pOptions;
        CAssureScriptsForThread * m_mainThreadScripts;
+       CLogFile * m_pLog;
        int m_nLastCompareResult;
        bool m_bNonInteractive;
 };
@@ -119,6 +123,7 @@ private:
 extern CMergeApp theApp;
 
 COptionsMgr * GetOptionsMgr();
+CLogFile * GetLog();
 
 /////////////////////////////////////////////////////////////////////////////
 CMergeDoc *GetDoc();
index 8473eac..cac4b0d 100644 (file)
@@ -72,8 +72,6 @@
 static char THIS_FILE[] = __FILE__;
 #endif
 
-extern CLogFile gLog;
-
 /** @brief Max len of path in caption. */
 static const UINT CAPTION_PATH_MAX = 50;
 
index c2b0858..5fc16b8 100644 (file)
@@ -23,7 +23,7 @@
  *
  *  @brief Support for VBS Scriptlets, VB ActiveX DLL, VC++ COM DLL
  */ 
-// RCS ID line follows -- this is updated by CVS
+// ID line follows -- this is updated by SVN
 // $Id$
 
 #include "StdAfx.h"
@@ -32,6 +32,8 @@
 #endif
 
 #include "pcre.h"
+#include "LogFile.h"
+#include "Merge.h"
 #include "Ucs2Utf8.h"
 #include "FileTransform.h"
 #include "FileFilterMgr.h"
@@ -42,8 +44,6 @@
 #include "Exceptions.h"
 #include "RegKey.h"
 #include "paths.h"
-#include "logfile.h"
-extern CLogFile gLog;
 
 #ifdef _DEBUG
 #define new DEBUG_NEW
@@ -570,7 +570,7 @@ static CStringArray & LoadTheScriptletList()
                if (IsWindowsScriptThere())
                        GetScriptletsAt(path, _T(".sct"), theScriptletList );           // VBS/JVS scriptlet
                else
-                       gLog.Write(CLogFile::LWARNING, _T("\n  .sct plugins disabled (Windows Script Host not found)"));
+                       GetLog()->Write(CLogFile::LWARNING, _T("\n  .sct plugins disabled (Windows Script Host not found)"));
                GetScriptletsAt(path, _T(".ocx"), theScriptletList );           // VB COM object
                GetScriptletsAt(path, _T(".dll"), theScriptletList );           // VC++ COM object
                scriptletsLoaded = true;
index 0682772..4f615cb 100644 (file)
 
 #include "stdafx.h"
 #include "LogFile.h"
-
-// Logging
-CLogFile gLog;
-
-/** @brief Report DeleteFile() failure to gLog */
-UINT gLog::DeleteFileFailed(LPCTSTR path)
-{
-       return::gLog.Write(CLogFile::LERROR|CLogFile::LOSERROR|CLogFile::LDEBUG, _T("DeleteFile(%s) failed: "), path);
-}
+#include "Merge.h"
 
 // Convert any negative inputs to negative char equivalents
 // This is aimed at correcting any chars mistakenly 
@@ -146,7 +138,7 @@ void LogErrorString(LPCTSTR sz)
        TRACE(_T("%s: %s\n"), (LPCTSTR)now, sz);
 
 #if defined (_DEBUG) || defined (ENABLE_LOG)
-       gLog.Write(CLogFile::LERROR, sz);
+       GetLog()->Write(CLogFile::LERROR, sz);
 #endif
 }
 
index 9f92e4a..9f03a54 100644 (file)
@@ -110,15 +110,6 @@ CString Fmt(LPCTSTR fmt, ...);
        /** @brief Get appropriate clipboard format for TCHAR text, ie, CF_TEXT or CF_UNICODETEXT */
 int GetClipTcharTextFormat();
 
-class CLogFile;
-extern CLogFile gLog;
-
-       /** @brief Shortcuts for common gLog messages */
-struct gLog
-{
-       static UINT DeleteFileFailed(LPCTSTR path);
-};
-
 bool IsUnicodeBuild();
 
        /** @brief include for the custom dialog boxes, with do not ask/display again */