Merge pull request #465 from lioncash/logging

Centralize the logging code into its own folder in Common.
This commit is contained in:
Lioncash 2014-06-25 22:21:49 -04:00
commit a5aac685d6
34 changed files with 92 additions and 90 deletions

View File

@ -1,50 +1,51 @@
set(SRCS BreakPoints.cpp set(SRCS BreakPoints.cpp
CDUtils.cpp CDUtils.cpp
ColorUtil.cpp ColorUtil.cpp
ConsoleListener.cpp FileSearch.cpp
FileSearch.cpp FileUtil.cpp
FileUtil.cpp Hash.cpp
Hash.cpp IniFile.cpp
IniFile.cpp MathUtil.cpp
LogManager.cpp MemArena.cpp
MathUtil.cpp MemoryUtil.cpp
MemArena.cpp Misc.cpp
MemoryUtil.cpp MsgHandler.cpp
Misc.cpp NandPaths.cpp
MsgHandler.cpp Network.cpp
NandPaths.cpp PcapFile.cpp
Network.cpp SettingsHandler.cpp
PcapFile.cpp SDCardUtil.cpp
SettingsHandler.cpp StringUtil.cpp
SDCardUtil.cpp SymbolDB.cpp
StringUtil.cpp SysConf.cpp
SymbolDB.cpp Thread.cpp
SysConf.cpp Timer.cpp
Thread.cpp Version.cpp
Timer.cpp x64ABI.cpp
Version.cpp x64Analyzer.cpp
x64ABI.cpp x64Emitter.cpp
x64Analyzer.cpp Crypto/bn.cpp
x64Emitter.cpp Crypto/ec.cpp
Crypto/bn.cpp Logging/ConsoleListener.cpp
Crypto/ec.cpp) Logging/LogManager.cpp)
if(_M_ARM_32) #ARMv7 if(_M_ARM_32) #ARMv7
set(SRCS ${SRCS} set(SRCS ${SRCS}
ArmCPUDetect.cpp ArmCPUDetect.cpp
ArmEmitter.cpp ArmEmitter.cpp
GenericFPURoundMode.cpp) GenericFPURoundMode.cpp)
elseif(_M_X86) #X86 elseif(_M_X86) #X86
set(SRCS ${SRCS} set(SRCS ${SRCS}
x64CPUDetect.cpp x64CPUDetect.cpp
x64FPURoundMode.cpp) x64FPURoundMode.cpp)
else() #Generic else() #Generic
set(SRCS ${SRCS} set(SRCS ${SRCS}
GenericFPURoundMode.cpp GenericFPURoundMode.cpp
x64CPUDetect.cpp) x64CPUDetect.cpp)
endif() endif()
if(WIN32) if(WIN32)
set(SRCS ${SRCS} ExtendedTrace.cpp) set(SRCS ${SRCS} ExtendedTrace.cpp)
endif(WIN32) endif(WIN32)
enable_precompiled_headers(stdafx.h stdafx.cpp SRCS) enable_precompiled_headers(stdafx.h stdafx.cpp SRCS)

View File

@ -168,5 +168,5 @@ enum EMUSTATE_CHANGE
#include "Common/CommonTypes.h" // IWYU pragma: export #include "Common/CommonTypes.h" // IWYU pragma: export
#include "Common/CommonFuncs.h" // IWYU pragma: export // NOLINT #include "Common/CommonFuncs.h" // IWYU pragma: export // NOLINT
#include "Common/Log.h" // IWYU pragma: export
#include "Common/MsgHandler.h" // IWYU pragma: export #include "Common/MsgHandler.h" // IWYU pragma: export
#include "Common/Logging/Log.h" // IWYU pragma: export

View File

@ -48,10 +48,7 @@
<ClInclude Include="CommonFuncs.h" /> <ClInclude Include="CommonFuncs.h" />
<ClInclude Include="CommonPaths.h" /> <ClInclude Include="CommonPaths.h" />
<ClInclude Include="CommonTypes.h" /> <ClInclude Include="CommonTypes.h" />
<ClInclude Include="ConsoleListener.h" />
<ClInclude Include="CPUDetect.h" /> <ClInclude Include="CPUDetect.h" />
<ClInclude Include="Crypto\bn.h" />
<ClInclude Include="Crypto\ec.h" />
<ClInclude Include="DebugInterface.h" /> <ClInclude Include="DebugInterface.h" />
<ClInclude Include="ExtendedTrace.h" /> <ClInclude Include="ExtendedTrace.h" />
<ClInclude Include="FifoQueue.h" /> <ClInclude Include="FifoQueue.h" />
@ -62,8 +59,6 @@
<ClInclude Include="Hash.h" /> <ClInclude Include="Hash.h" />
<ClInclude Include="IniFile.h" /> <ClInclude Include="IniFile.h" />
<ClInclude Include="LinearDiskCache.h" /> <ClInclude Include="LinearDiskCache.h" />
<ClInclude Include="Log.h" />
<ClInclude Include="LogManager.h" />
<ClInclude Include="MathUtil.h" /> <ClInclude Include="MathUtil.h" />
<ClInclude Include="MemArena.h" /> <ClInclude Include="MemArena.h" />
<ClInclude Include="MemoryUtil.h" /> <ClInclude Include="MemoryUtil.h" />
@ -86,20 +81,21 @@
<ClInclude Include="x64ABI.h" /> <ClInclude Include="x64ABI.h" />
<ClInclude Include="x64Analyzer.h" /> <ClInclude Include="x64Analyzer.h" />
<ClInclude Include="x64Emitter.h" /> <ClInclude Include="x64Emitter.h" />
<ClInclude Include="Crypto\bn.h" />
<ClInclude Include="Crypto\ec.h" />
<ClInclude Include="Logging\ConsoleListener.h" />
<ClInclude Include="Logging\Log.h" />
<ClInclude Include="Logging\LogManager.h" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="BreakPoints.cpp" /> <ClCompile Include="BreakPoints.cpp" />
<ClCompile Include="CDUtils.cpp" /> <ClCompile Include="CDUtils.cpp" />
<ClCompile Include="ColorUtil.cpp" /> <ClCompile Include="ColorUtil.cpp" />
<ClCompile Include="ConsoleListener.cpp" />
<ClCompile Include="Crypto\bn.cpp" />
<ClCompile Include="Crypto\ec.cpp" />
<ClCompile Include="ExtendedTrace.cpp" /> <ClCompile Include="ExtendedTrace.cpp" />
<ClCompile Include="FileSearch.cpp" /> <ClCompile Include="FileSearch.cpp" />
<ClCompile Include="FileUtil.cpp" /> <ClCompile Include="FileUtil.cpp" />
<ClCompile Include="Hash.cpp" /> <ClCompile Include="Hash.cpp" />
<ClCompile Include="IniFile.cpp" /> <ClCompile Include="IniFile.cpp" />
<ClCompile Include="LogManager.cpp" />
<ClCompile Include="MathUtil.cpp" /> <ClCompile Include="MathUtil.cpp" />
<ClCompile Include="MemArena.cpp" /> <ClCompile Include="MemArena.cpp" />
<ClCompile Include="MemoryUtil.cpp" /> <ClCompile Include="MemoryUtil.cpp" />
@ -125,6 +121,10 @@
<ClCompile Include="x64Emitter.cpp" /> <ClCompile Include="x64Emitter.cpp" />
<ClCompile Include="x64FPURoundMode.cpp" /> <ClCompile Include="x64FPURoundMode.cpp" />
<ClCompile Include="XSaveWorkaround.cpp" /> <ClCompile Include="XSaveWorkaround.cpp" />
<ClCompile Include="Crypto\bn.cpp" />
<ClCompile Include="Crypto\ec.cpp" />
<ClCompile Include="Logging\ConsoleListener.cpp" />
<ClCompile Include="Logging\LogManager.cpp" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Text Include="CMakeLists.txt" /> <Text Include="CMakeLists.txt" />

View File

@ -54,13 +54,13 @@
<ClInclude Include="x64ABI.h" /> <ClInclude Include="x64ABI.h" />
<ClInclude Include="x64Analyzer.h" /> <ClInclude Include="x64Analyzer.h" />
<ClInclude Include="x64Emitter.h" /> <ClInclude Include="x64Emitter.h" />
<ClInclude Include="ConsoleListener.h"> <ClInclude Include="Logging\ConsoleListener.h">
<Filter>Logging</Filter> <Filter>Logging</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="Log.h"> <ClInclude Include="Logging\Log.h">
<Filter>Logging</Filter> <Filter>Logging</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="LogManager.h"> <ClInclude Include="Logging\LogManager.h">
<Filter>Logging</Filter> <Filter>Logging</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="stdafx.h" /> <ClInclude Include="stdafx.h" />
@ -107,10 +107,10 @@
<ClCompile Include="Crypto\ec.cpp"> <ClCompile Include="Crypto\ec.cpp">
<Filter>Crypto</Filter> <Filter>Crypto</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="ConsoleListener.cpp"> <ClCompile Include="Logging\ConsoleListener.cpp">
<Filter>Logging</Filter> <Filter>Logging</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="LogManager.cpp"> <ClCompile Include="Logging\LogManager.cpp">
<Filter>Logging</Filter> <Filter>Logging</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="stdafx.cpp" /> <ClCompile Include="stdafx.cpp" />

View File

@ -12,8 +12,8 @@
#include <array> #include <array>
#endif #endif
#include "Common/ConsoleListener.h"
#include "Common/StringUtil.h" #include "Common/StringUtil.h"
#include "Common/Logging/ConsoleListener.h"
ConsoleListener::ConsoleListener() ConsoleListener::ConsoleListener()
{ {

View File

@ -4,7 +4,7 @@
#pragma once #pragma once
#include "Common/LogManager.h" #include "Common/Logging/LogManager.h"
#ifdef _WIN32 #ifdef _WIN32
#include <windows.h> #include <windows.h>

View File

@ -12,12 +12,12 @@
#ifdef ANDROID #ifdef ANDROID
#include "Core/Host.h" #include "Core/Host.h"
#endif #endif
#include "Common/ConsoleListener.h"
#include "Common/FileUtil.h" #include "Common/FileUtil.h"
#include "Common/Log.h"
#include "Common/LogManager.h"
#include "Common/StringUtil.h" #include "Common/StringUtil.h"
#include "Common/Timer.h" #include "Common/Timer.h"
#include "Common/Logging/ConsoleListener.h"
#include "Common/Logging/Log.h"
#include "Common/Logging/LogManager.h"
void GenericLog(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type, void GenericLog(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type,
const char *file, int line, const char* fmt, ...) const char *file, int line, const char* fmt, ...)

View File

@ -6,8 +6,8 @@
#include "Common/Common.h" #include "Common/Common.h"
#include "Common/CPUDetect.h" #include "Common/CPUDetect.h"
#include "Common/Log.h"
#include "Common/x64Emitter.h" #include "Common/x64Emitter.h"
#include "Common/Logging/Log.h"
namespace Gen namespace Gen
{ {

View File

@ -23,8 +23,8 @@
#include <vector> #include <vector>
#include "Common/Common.h" #include "Common/Common.h"
#include "Common/LogManager.h"
#include "Common/StringUtil.h" #include "Common/StringUtil.h"
#include "Common/Logging/LogManager.h"
#include "Core/ActionReplay.h" #include "Core/ActionReplay.h"
#include "Core/ARDecrypt.h" #include "Core/ARDecrypt.h"

View File

@ -14,12 +14,12 @@
#include "Common/Common.h" #include "Common/Common.h"
#include "Common/CommonPaths.h" #include "Common/CommonPaths.h"
#include "Common/CPUDetect.h" #include "Common/CPUDetect.h"
#include "Common/LogManager.h"
#include "Common/MathUtil.h" #include "Common/MathUtil.h"
#include "Common/MemoryUtil.h" #include "Common/MemoryUtil.h"
#include "Common/StringUtil.h" #include "Common/StringUtil.h"
#include "Common/Thread.h" #include "Common/Thread.h"
#include "Common/Timer.h" #include "Common/Timer.h"
#include "Common/Logging/LogManager.h"
#include "Core/ConfigManager.h" #include "Core/ConfigManager.h"
#include "Core/Core.h" #include "Core/Core.h"

View File

@ -6,8 +6,8 @@
#include "Common/ChunkFile.h" #include "Common/ChunkFile.h"
#include "Common/IniFile.h" #include "Common/IniFile.h"
#include "Common/LogManager.h"
#include "Common/StringUtil.h" #include "Common/StringUtil.h"
#include "Common/Logging/LogManager.h"
#include "Core/ConfigManager.h" #include "Core/ConfigManager.h"
#include "Core/Core.h" #include "Core/Core.h"

View File

@ -9,9 +9,9 @@
#include "Common/CPUDetect.h" #include "Common/CPUDetect.h"
#include "Common/Event.h" #include "Common/Event.h"
#include "Common/IniFile.h" #include "Common/IniFile.h"
#include "Common/LogManager.h"
#include "Common/StdMutex.h" #include "Common/StdMutex.h"
#include "Common/StdThread.h" #include "Common/StdThread.h"
#include "Common/Logging/LogManager.h"
#include "Core/ConfigManager.h" #include "Core/ConfigManager.h"
#include "Core/Core.h" #include "Core/Core.h"

View File

@ -5,7 +5,7 @@
#include <cinttypes> #include <cinttypes>
#include "Common/Common.h" #include "Common/Common.h"
#include "Common/LogManager.h" #include "Common/Logging/LogManager.h"
#include "Core/Core.h" #include "Core/Core.h"
#include "Core/VolumeHandler.h" #include "Core/VolumeHandler.h"

View File

@ -10,8 +10,8 @@
#include <vector> #include <vector>
#include "Common/Common.h" #include "Common/Common.h"
#include "Common/LogManager.h"
#include "Common/StringUtil.h" #include "Common/StringUtil.h"
#include "Common/Logging/LogManager.h"
#include "Core/ConfigManager.h" #include "Core/ConfigManager.h"
#include "Core/Core.h" #include "Core/Core.h"

View File

@ -14,10 +14,10 @@
#include "Common/Common.h" #include "Common/Common.h"
#include "Common/FileUtil.h" #include "Common/FileUtil.h"
#include "Common/Log.h"
#include "Common/MathUtil.h" #include "Common/MathUtil.h"
#include "Common/NandPaths.h" #include "Common/NandPaths.h"
#include "Common/StringUtil.h" #include "Common/StringUtil.h"
#include "Common/Logging/Log.h"
#include "DiscIO/NANDContentLoader.h" #include "DiscIO/NANDContentLoader.h"
#include "DiscIO/Volume.h" #include "DiscIO/Volume.h"

View File

@ -8,8 +8,8 @@
#include "Common/Common.h" #include "Common/Common.h"
#include "Common/FileUtil.h" #include "Common/FileUtil.h"
#include "Common/Log.h"
#include "Common/MathUtil.h" #include "Common/MathUtil.h"
#include "Common/Logging/Log.h"
#include "DiscIO/Blob.h" #include "DiscIO/Blob.h"
#include "DiscIO/WiiWad.h" #include "DiscIO/WiiWad.h"

View File

@ -44,9 +44,9 @@
#include <wx/aui/framemanager.h> #include <wx/aui/framemanager.h>
#include "Common/Common.h" #include "Common/Common.h"
#include "Common/ConsoleListener.h"
#include "Common/FileUtil.h" #include "Common/FileUtil.h"
#include "Common/Thread.h" #include "Common/Thread.h"
#include "Common/Logging/ConsoleListener.h"
#include "Core/ConfigManager.h" #include "Core/ConfigManager.h"
#include "Core/Core.h" #include "Core/Core.h"

View File

@ -31,10 +31,10 @@
#include <wx/aui/framemanager.h> #include <wx/aui/framemanager.h>
#include "Common/Common.h" #include "Common/Common.h"
#include "Common/ConsoleListener.h"
#include "Common/FileUtil.h" #include "Common/FileUtil.h"
#include "Common/IniFile.h" #include "Common/IniFile.h"
#include "Common/StringUtil.h" #include "Common/StringUtil.h"
#include "Common/Logging/ConsoleListener.h"
#include "Core/ConfigManager.h" #include "Core/ConfigManager.h"
#include "DolphinWX/Frame.h" #include "DolphinWX/Frame.h"
#include "DolphinWX/Globals.h" #include "DolphinWX/Globals.h"

View File

@ -18,11 +18,11 @@
#include <wx/validate.h> #include <wx/validate.h>
#include <wx/windowid.h> #include <wx/windowid.h>
#include "Common/ConsoleListener.h"
#include "Common/FileUtil.h" #include "Common/FileUtil.h"
#include "Common/IniFile.h" #include "Common/IniFile.h"
#include "Common/Log.h" #include "Common/Logging/ConsoleListener.h"
#include "Common/LogManager.h" #include "Common/Logging/Log.h"
#include "Common/Logging/LogManager.h"
#include "DolphinWX/LogConfigWindow.h" #include "DolphinWX/LogConfigWindow.h"
#include "DolphinWX/LogWindow.h" #include "DolphinWX/LogWindow.h"
#include "DolphinWX/WxUtils.h" #include "DolphinWX/WxUtils.h"

View File

@ -29,10 +29,10 @@
#include <wx/aui/framemanager.h> #include <wx/aui/framemanager.h>
#include "Common/Common.h" #include "Common/Common.h"
#include "Common/ConsoleListener.h"
#include "Common/FileUtil.h" #include "Common/FileUtil.h"
#include "Common/IniFile.h" #include "Common/IniFile.h"
#include "Common/LogManager.h" #include "Common/Logging/ConsoleListener.h"
#include "Common/Logging/LogManager.h"
#include "DolphinWX/Frame.h" #include "DolphinWX/Frame.h"
#include "DolphinWX/LogWindow.h" #include "DolphinWX/LogWindow.h"
#include "DolphinWX/WxUtils.h" #include "DolphinWX/WxUtils.h"

View File

@ -18,7 +18,7 @@
#include <wx/windowid.h> #include <wx/windowid.h>
#include "Common/Common.h" #include "Common/Common.h"
#include "Common/LogManager.h" #include "Common/Logging/LogManager.h"
class CFrame; class CFrame;
class wxBoxSizer; class wxBoxSizer;

View File

@ -33,8 +33,8 @@
#include "Common/CPUDetect.h" #include "Common/CPUDetect.h"
#include "Common/FileUtil.h" #include "Common/FileUtil.h"
#include "Common/IniFile.h" #include "Common/IniFile.h"
#include "Common/LogManager.h"
#include "Common/Thread.h" #include "Common/Thread.h"
#include "Common/Logging/LogManager.h"
#include "Core/ConfigManager.h" #include "Core/ConfigManager.h"
#include "Core/CoreParameter.h" #include "Core/CoreParameter.h"

View File

@ -29,7 +29,7 @@
#include "Common/CPUDetect.h" #include "Common/CPUDetect.h"
#include "Common/Event.h" #include "Common/Event.h"
#include "Common/FileUtil.h" #include "Common/FileUtil.h"
#include "Common/LogManager.h" #include "Common/Logging/LogManager.h"
#include "Core/BootManager.h" #include "Core/BootManager.h"
#include "Core/ConfigManager.h" #include "Core/ConfigManager.h"
#include "Core/Core.h" #include "Core/Core.h"

View File

@ -11,7 +11,7 @@
#include "Common/Common.h" #include "Common/Common.h"
#include "Common/Event.h" #include "Common/Event.h"
#include "Common/LogManager.h" #include "Common/Logging/LogManager.h"
#include "Core/BootManager.h" #include "Core/BootManager.h"
#include "Core/ConfigManager.h" #include "Core/ConfigManager.h"

View File

@ -6,7 +6,7 @@
#include <unistd.h> #include <unistd.h>
#include <sys/wait.h> #include <sys/wait.h>
#include "Common/Log.h" #include "Common/Logging/Log.h"
#include "Core/ConfigManager.h" #include "Core/ConfigManager.h"
#include "Core/Core.h" #include "Core/Core.h"
#include "Core/CoreParameter.h" #include "Core/CoreParameter.h"

View File

@ -2,7 +2,7 @@
// Licensed under GPLv2 // Licensed under GPLv2
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "Common/Log.h" #include "Common/Logging/Log.h"
#include "VideoBackends/D3D/D3DBase.h" #include "VideoBackends/D3D/D3DBase.h"
#include "VideoBackends/D3D/GfxState.h" #include "VideoBackends/D3D/GfxState.h"

View File

@ -7,8 +7,8 @@
#include "Common/FileUtil.h" #include "Common/FileUtil.h"
#include "Common/IniFile.h" #include "Common/IniFile.h"
#include "Common/LogManager.h"
#include "Common/StringUtil.h" #include "Common/StringUtil.h"
#include "Common/Logging/LogManager.h"
#include "Core/ConfigManager.h" #include "Core/ConfigManager.h"
#include "Core/Core.h" #include "Core/Core.h"

View File

@ -5,7 +5,7 @@
#include <sstream> #include <sstream>
#include <unordered_map> #include <unordered_map>
#include "Common/Log.h" #include "Common/Logging/Log.h"
#include "VideoBackends/OGL/GLExtensions/GLExtensions.h" #include "VideoBackends/OGL/GLExtensions/GLExtensions.h"
#if defined(__linux__) || defined(__APPLE__) #if defined(__linux__) || defined(__APPLE__)

View File

@ -41,8 +41,8 @@ Make AA apply instantly during gameplay if possible
#include "Common/Atomic.h" #include "Common/Atomic.h"
#include "Common/CommonPaths.h" #include "Common/CommonPaths.h"
#include "Common/LogManager.h"
#include "Common/Thread.h" #include "Common/Thread.h"
#include "Common/Logging/LogManager.h"
#include "Core/ConfigManager.h" #include "Core/ConfigManager.h"
#include "Core/Core.h" #include "Core/Core.h"

View File

@ -7,8 +7,8 @@
#include "Common/Atomic.h" #include "Common/Atomic.h"
#include "Common/Common.h" #include "Common/Common.h"
#include "Common/FileUtil.h" #include "Common/FileUtil.h"
#include "Common/LogManager.h"
#include "Common/StringUtil.h" #include "Common/StringUtil.h"
#include "Common/Logging/LogManager.h"
#include "Core/ConfigManager.h" #include "Core/ConfigManager.h"
#include "Core/Core.h" #include "Core/Core.h"

View File

@ -10,8 +10,9 @@
#include "Common/CommonPaths.h" #include "Common/CommonPaths.h"
#include "Common/FileUtil.h" #include "Common/FileUtil.h"
#include "Common/Log.h"
#include "Common/StringUtil.h" #include "Common/StringUtil.h"
#include "Common/Logging/Log.h"
#include "Core/HW/VideoInterface.h" //for TargetRefreshRate #include "Core/HW/VideoInterface.h" //for TargetRefreshRate
#include "VideoCommon/AVIDump.h" #include "VideoCommon/AVIDump.h"
#include "VideoCommon/VideoConfig.h" #include "VideoCommon/VideoConfig.h"

View File

@ -4,7 +4,7 @@
#include <map> #include <map>
#include "Common/LogManager.h" #include "Common/Logging/LogManager.h"
#include "VideoCommon/DriverDetails.h" #include "VideoCommon/DriverDetails.h"
namespace DriverDetails namespace DriverDetails