mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-18 19:28:36 +00:00
removed old logging left over
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1387 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
b08352d1e4
commit
a37376f1cd
@ -1,95 +0,0 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
#if 0
|
||||
|
||||
#include "Logging.h"
|
||||
|
||||
|
||||
// __________________________________________________________________________________________________
|
||||
// constructor
|
||||
//
|
||||
CDebugger_Log::CDebugger_Log(const char* _szShortName, const char* _szName)
|
||||
: m_pFile(NULL),
|
||||
m_bLogToFile(false),
|
||||
m_bShowInLog(false),
|
||||
m_bEnable(false)
|
||||
{
|
||||
strcpy((char*)m_szName, _szName);
|
||||
strcpy((char*)m_szShortName, _szShortName);
|
||||
sprintf((char*)m_szFilename, "logs\\%s.txt", _szShortName);
|
||||
|
||||
_unlink(m_szFilename);
|
||||
}
|
||||
|
||||
|
||||
// __________________________________________________________________________________________________
|
||||
// destructor
|
||||
//
|
||||
CDebugger_Log::~CDebugger_Log(void)
|
||||
{
|
||||
if (m_pFile)
|
||||
{
|
||||
fclose(m_pFile);
|
||||
m_pFile = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CDebugger_Log::LoadSettings(IniFile& ini)
|
||||
{
|
||||
char temp[256];
|
||||
sprintf(temp, "%s_LogToFile", m_szShortName);
|
||||
ini.Get("Logging", temp, &m_bLogToFile, false);
|
||||
|
||||
sprintf(temp, "%s_ShowInLog", m_szShortName);
|
||||
ini.Get("Logging", temp, &m_bShowInLog, true);
|
||||
|
||||
sprintf(temp, "%s_Enable", m_szShortName);
|
||||
ini.Get("Logging", temp, &m_bEnable, true);
|
||||
}
|
||||
|
||||
|
||||
void CDebugger_Log::SaveSettings(IniFile& ini)
|
||||
{
|
||||
char temp[256];
|
||||
sprintf(temp, "%s_LogToFile", m_szShortName);
|
||||
ini.Set("Logging", temp, m_bLogToFile);
|
||||
sprintf(temp, "%s_ShowInLog", m_szShortName);
|
||||
ini.Set("Logging", temp, m_bShowInLog);
|
||||
sprintf(temp, "%s_Enable", m_szShortName);
|
||||
ini.Set("Logging", temp, m_bEnable);
|
||||
}
|
||||
|
||||
|
||||
// __________________________________________________________________________________________________
|
||||
// Init
|
||||
//
|
||||
void
|
||||
CDebugger_Log::Init(void)
|
||||
{
|
||||
if (m_pFile != NULL)
|
||||
{
|
||||
fclose(m_pFile);
|
||||
m_pFile = NULL;
|
||||
}
|
||||
|
||||
// reopen the file and rewrite it
|
||||
m_pFile = fopen(m_szFilename, "wt");
|
||||
}
|
||||
|
||||
|
||||
#endif
|
@ -1,92 +0,0 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
#if 0
|
||||
|
||||
// THESE WILL BE REPLACED WITH A CLEANED UP LOGGING SYSTEM
|
||||
|
||||
#ifndef _LOGGING_H
|
||||
#define _LOGGING_H
|
||||
|
||||
class IniFile;
|
||||
|
||||
// should be inside the LogManager ...
|
||||
struct CDebugger_Log
|
||||
{
|
||||
char m_szName[128];
|
||||
char m_szShortName[10];
|
||||
char m_szFilename[256];
|
||||
bool m_bLogToFile;
|
||||
bool m_bShowInLog;
|
||||
bool m_bEnable;
|
||||
FILE* m_pFile;
|
||||
|
||||
void Init(void);
|
||||
|
||||
|
||||
// constructor
|
||||
CDebugger_Log(const char* _szShortName, const char* _szName);
|
||||
|
||||
// destructor
|
||||
~CDebugger_Log(void);
|
||||
};
|
||||
|
||||
|
||||
#ifdef LOGGING
|
||||
|
||||
#define LOG(_t_, ...) LogManager::Log(LogManager::_t_, __VA_ARGS__);
|
||||
|
||||
#define _dbg_assert_(_t_, _a_)\
|
||||
if (!(_a_)){\
|
||||
char szError[512]; \
|
||||
sprintf_s(szError, 512, "Error localized at...\n\n Line: %d\n File: %s\n Time: %s\n\nIgnore and continue?", __LINE__, __FILE__, __TIMESTAMP__); \
|
||||
LOG(_t_, szError); \
|
||||
if (MessageBox(NULL, szError, "*** Assertion Report ***", MB_YESNO | MB_ICONERROR) == IDNO){Crash();} \
|
||||
}
|
||||
#define _dbg_assert_msg_(_t_, _a_, _fmt_, ...)\
|
||||
if (!(_a_)){\
|
||||
char szError[582], szError2[512]; \
|
||||
sprintf_s(szError2, 512, _fmt_, __VA_ARGS__); \
|
||||
sprintf_s(szError, 582, "Desc.: %s\n\nIgnore and continue?", szError2); \
|
||||
LOG(_t_, szError); \
|
||||
if (MessageBox(NULL, szError, "*** Fatal Error ***", MB_YESNO | MB_ICONERROR) == IDNO){Crash();} \
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#define LOG(_t_, ...)
|
||||
#define _dbg_clear_()
|
||||
#define _dbg_assert_(_t_, _a_) ;
|
||||
#define _dbg_assert_msg_(_t_, _a_, _desc_, ...) ;
|
||||
#define _dbg_update_() ;
|
||||
|
||||
#endif
|
||||
|
||||
#define _assert_msg_(_t_, _a_, _fmt_, ...)\
|
||||
if (!(_a_)){\
|
||||
char szError[582], szError2[512]; \
|
||||
sprintf_s(szError2, 512, _fmt_, __VA_ARGS__); \
|
||||
sprintf_s(szError, 582, "Desc.: %s\n\nIgnore and continue?", szError2); \
|
||||
LOG(_t_, szError); \
|
||||
if (MessageBox(NULL, szError, "*** Fatal Error ***", MB_YESNO | MB_ICONERROR) == IDNO){Crash();} \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
@ -11,7 +11,6 @@ files = [
|
||||
"Hash.cpp",
|
||||
"IniFile.cpp",
|
||||
"FileSearch.cpp",
|
||||
"Logging.cpp",
|
||||
"FileUtil.cpp",
|
||||
"MappedFile.cpp",
|
||||
"MathUtil.cpp",
|
||||
|
Loading…
x
Reference in New Issue
Block a user