mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 21:41:26 +12:00
Move Log.h to util/logs.hpp
This commit is contained in:
parent
a166d3680e
commit
e4a81b1d13
25 changed files with 39 additions and 32 deletions
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include "Utilities/types.h"
|
#include "Utilities/types.h"
|
||||||
#include "Utilities/StrFmt.h"
|
#include "Utilities/StrFmt.h"
|
||||||
#include "Utilities/Log.h"
|
#include "util/logs.hpp"
|
||||||
#include "util/atomic.hpp"
|
#include "util/atomic.hpp"
|
||||||
#include "util/shared_cptr.hpp"
|
#include "util/shared_cptr.hpp"
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#include "JIT.h"
|
#include "JIT.h"
|
||||||
#include "StrFmt.h"
|
#include "StrFmt.h"
|
||||||
#include "File.h"
|
#include "File.h"
|
||||||
#include "Log.h"
|
#include "util/logs.hpp"
|
||||||
#include "mutex.h"
|
#include "mutex.h"
|
||||||
#include "sysinfo.h"
|
#include "sysinfo.h"
|
||||||
#include "VirtualMemory.h"
|
#include "VirtualMemory.h"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "Log.h"
|
#include "util/logs.hpp"
|
||||||
#include "File.h"
|
#include "File.h"
|
||||||
#include "StrFmt.h"
|
#include "StrFmt.h"
|
||||||
#include "sema.h"
|
#include "sema.h"
|
||||||
|
@ -279,9 +279,12 @@ void logs::listener::add(logs::listener* _new)
|
||||||
std::lock_guard lock(g_mutex);
|
std::lock_guard lock(g_mutex);
|
||||||
|
|
||||||
// Install new listener at the end of linked list
|
// Install new listener at the end of linked list
|
||||||
while (lis->m_next || !lis->m_next.compare_and_swap_test(nullptr, _new))
|
listener* null = nullptr;
|
||||||
|
|
||||||
|
while (lis->m_next || !lis->m_next.compare_exchange_strong(null, _new))
|
||||||
{
|
{
|
||||||
lis = lis->m_next;
|
lis = lis->m_next;
|
||||||
|
null = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "sync.h"
|
#include "sync.h"
|
||||||
#include "Log.h"
|
#include "util/logs.hpp"
|
||||||
|
|
||||||
LOG_CHANNEL(sig_log);
|
LOG_CHANNEL(sig_log);
|
||||||
LOG_CHANNEL(sys_log, "SYS");
|
LOG_CHANNEL(sys_log, "SYS");
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "Utilities/Log.h"
|
#include "util/logs.hpp"
|
||||||
#include "VirtualMemory.h"
|
#include "VirtualMemory.h"
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Utilities/types.h"
|
#include "Utilities/types.h"
|
||||||
#include "Utilities/Log.h"
|
#include "util/logs.hpp"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
#include "Utilities/types.h"
|
#include "Utilities/types.h"
|
||||||
#include "Utilities/File.h"
|
#include "Utilities/File.h"
|
||||||
#include "Utilities/Log.h"
|
#include "util/logs.hpp"
|
||||||
|
|
||||||
LOG_CHANNEL(self_log, "SELF");
|
LOG_CHANNEL(self_log, "SELF");
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#error "XAudio2 can only be built on Windows."
|
#error "XAudio2 can only be built on Windows."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Utilities/Log.h"
|
#include "util/logs.hpp"
|
||||||
#include "Utilities/StrFmt.h"
|
#include "Utilities/StrFmt.h"
|
||||||
#include "Emu/System.h"
|
#include "Emu/System.h"
|
||||||
#include "Emu/system_config.h"
|
#include "Emu/system_config.h"
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include "Utilities/StrFmt.h"
|
#include "Utilities/StrFmt.h"
|
||||||
#include "Utilities/BEType.h"
|
#include "Utilities/BEType.h"
|
||||||
#include "Utilities/BitField.h"
|
#include "Utilities/BitField.h"
|
||||||
#include "Utilities/Log.h"
|
#include "util/logs.hpp"
|
||||||
#include "Utilities/JIT.h"
|
#include "Utilities/JIT.h"
|
||||||
|
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include "PPUThread.h"
|
#include "PPUThread.h"
|
||||||
#include "PPUInterpreter.h"
|
#include "PPUInterpreter.h"
|
||||||
|
|
||||||
#include "../Utilities/Log.h"
|
#include "util/logs.hpp"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
|
|
||||||
#include "GDB.h"
|
#include "GDB.h"
|
||||||
#include "Utilities/Log.h"
|
#include "util/logs.hpp"
|
||||||
#include "Utilities/StrUtil.h"
|
#include "Utilities/StrUtil.h"
|
||||||
#include "Emu/Memory/vm.h"
|
#include "Emu/Memory/vm.h"
|
||||||
#include "Emu/System.h"
|
#include "Emu/System.h"
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
#include "Utilities/hash.h"
|
#include "Utilities/hash.h"
|
||||||
#include "Utilities/mutex.h"
|
#include "Utilities/mutex.h"
|
||||||
#include "Utilities/Log.h"
|
#include "util/logs.hpp"
|
||||||
#include "Utilities/span.h"
|
#include "Utilities/span.h"
|
||||||
|
|
||||||
#include <deque>
|
#include <deque>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Utilities/Log.h"
|
#include "util/logs.hpp"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ring buffer memory helper :
|
* Ring buffer memory helper :
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#include "GLHelpers.h"
|
#include "GLHelpers.h"
|
||||||
#include "GLTexture.h"
|
#include "GLTexture.h"
|
||||||
#include "GLCompute.h"
|
#include "GLCompute.h"
|
||||||
#include "Utilities/Log.h"
|
#include "util/logs.hpp"
|
||||||
|
|
||||||
namespace gl
|
namespace gl
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
#include "Emu/system_config.h"
|
#include "Emu/system_config.h"
|
||||||
#include "Utilities/geometry.h"
|
#include "Utilities/geometry.h"
|
||||||
#include "Utilities/Log.h"
|
#include "util/logs.hpp"
|
||||||
|
|
||||||
#define GL_FRAGMENT_TEXTURES_START 0
|
#define GL_FRAGMENT_TEXTURES_START 0
|
||||||
#define GL_VERTEX_TEXTURES_START (GL_FRAGMENT_TEXTURES_START + 16)
|
#define GL_VERTEX_TEXTURES_START (GL_FRAGMENT_TEXTURES_START + 16)
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
#include "Emu/Io/pad_config.h"
|
#include "Emu/Io/pad_config.h"
|
||||||
#include "evdev_joystick_handler.h"
|
#include "evdev_joystick_handler.h"
|
||||||
#include "Utilities/Log.h"
|
#include "util/logs.hpp"
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
|
@ -459,7 +459,7 @@
|
||||||
<ClInclude Include="..\Utilities\mutex.h" />
|
<ClInclude Include="..\Utilities\mutex.h" />
|
||||||
<ClInclude Include="..\Utilities\sema.h" />
|
<ClInclude Include="..\Utilities\sema.h" />
|
||||||
<ClInclude Include="..\Utilities\sync.h" />
|
<ClInclude Include="..\Utilities\sync.h" />
|
||||||
<ClInclude Include="..\Utilities\Log.h" />
|
<ClInclude Include="util\logs.hpp" />
|
||||||
<ClInclude Include="..\Utilities\File.h" />
|
<ClInclude Include="..\Utilities\File.h" />
|
||||||
<ClInclude Include="..\Utilities\Config.h" />
|
<ClInclude Include="..\Utilities\Config.h" />
|
||||||
<ClInclude Include="..\Utilities\rXml.h" />
|
<ClInclude Include="..\Utilities\rXml.h" />
|
||||||
|
|
|
@ -1024,7 +1024,7 @@
|
||||||
<ClInclude Include="..\Utilities\Timer.h">
|
<ClInclude Include="..\Utilities\Timer.h">
|
||||||
<Filter>Utilities</Filter>
|
<Filter>Utilities</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\Utilities\Log.h">
|
<ClInclude Include="util\logs.hpp">
|
||||||
<Filter>Utilities</Filter>
|
<Filter>Utilities</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="Emu\RSX\Null\NullGSRender.h">
|
<ClInclude Include="Emu\RSX\Null\NullGSRender.h">
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "Utilities/Log.h"
|
#include "util/logs.hpp"
|
||||||
|
|
||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
#include <QSize>
|
#include <QSize>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Utilities/File.h"
|
#include "Utilities/File.h"
|
||||||
#include "Utilities/Log.h"
|
#include "util/logs.hpp"
|
||||||
|
|
||||||
#include "custom_dock_widget.h"
|
#include "custom_dock_widget.h"
|
||||||
#include "find_dialog.h"
|
#include "find_dialog.h"
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
|
|
||||||
#include "Utilities/Log.h"
|
#include "util/logs.hpp"
|
||||||
#include "Utilities/StrUtil.h"
|
#include "Utilities/StrUtil.h"
|
||||||
#include "Emu/VFS.h"
|
#include "Emu/VFS.h"
|
||||||
#include "Emu/System.h"
|
#include "Emu/System.h"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#include "Emu/System.h"
|
#include "Emu/System.h"
|
||||||
#include "Utilities/File.h"
|
#include "Utilities/File.h"
|
||||||
#include "Utilities/StrFmt.h"
|
#include "Utilities/StrFmt.h"
|
||||||
#include "Utilities/Log.h"
|
#include "util/logs.hpp"
|
||||||
|
|
||||||
LOG_CHANNEL(gui_log, "GUI");
|
LOG_CHANNEL(gui_log, "GUI");
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
#include "Utilities/StrUtil.h"
|
#include "Utilities/StrUtil.h"
|
||||||
#include "Utilities/File.h"
|
#include "Utilities/File.h"
|
||||||
#include "Utilities/Log.h"
|
#include "util/logs.hpp"
|
||||||
|
|
||||||
#include <QRegExpValidator>
|
#include <QRegExpValidator>
|
||||||
#include <QInputDialog>
|
#include <QInputDialog>
|
||||||
|
|
|
@ -25,7 +25,7 @@ namespace std { inline namespace literals { inline namespace chrono_literals {}}
|
||||||
#include "util/atomic.hpp"
|
#include "util/atomic.hpp"
|
||||||
#include "Utilities/StrFmt.h"
|
#include "Utilities/StrFmt.h"
|
||||||
#include "Utilities/File.h"
|
#include "Utilities/File.h"
|
||||||
#include "Utilities/Log.h"
|
#include "util/logs.hpp"
|
||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
|
@ -1,14 +1,18 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "types.h"
|
#include <cstdint>
|
||||||
#include "StrFmt.h"
|
|
||||||
#include "util/atomic.hpp"
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <initializer_list>
|
||||||
|
#include "Utilities/StrFmt.h"
|
||||||
|
|
||||||
namespace logs
|
namespace logs
|
||||||
{
|
{
|
||||||
enum class level : uint
|
using u64 = std::uint64_t;
|
||||||
|
|
||||||
|
enum class level : unsigned
|
||||||
{
|
{
|
||||||
always, // Highest log severity (unused, cannot be disabled)
|
always, // Highest log severity (unused, cannot be disabled)
|
||||||
fatal,
|
fatal,
|
||||||
|
@ -46,7 +50,7 @@ namespace logs
|
||||||
class listener
|
class listener
|
||||||
{
|
{
|
||||||
// Next listener (linked list)
|
// Next listener (linked list)
|
||||||
atomic_t<listener*> m_next{};
|
std::atomic<listener*> m_next{};
|
||||||
|
|
||||||
friend struct message;
|
friend struct message;
|
||||||
|
|
||||||
|
@ -84,7 +88,7 @@ namespace logs
|
||||||
#if __cpp_char8_t >= 201811
|
#if __cpp_char8_t >= 201811
|
||||||
using char2 = char8_t;
|
using char2 = char8_t;
|
||||||
#else
|
#else
|
||||||
using char2 = uchar;
|
using char2 = unsigned char;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define GEN_LOG_METHOD(_sev)\
|
#define GEN_LOG_METHOD(_sev)\
|
Loading…
Add table
Add a link
Reference in a new issue