1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 02:32:36 +01:00

Move Log.h to util/logs.hpp

This commit is contained in:
Nekotekina 2020-03-07 12:29:23 +03:00
parent a166d3680e
commit e4a81b1d13
25 changed files with 39 additions and 32 deletions

View File

@ -2,7 +2,7 @@
#include "Utilities/types.h"
#include "Utilities/StrFmt.h"
#include "Utilities/Log.h"
#include "util/logs.hpp"
#include "util/atomic.hpp"
#include "util/shared_cptr.hpp"

View File

@ -2,7 +2,7 @@
#include "JIT.h"
#include "StrFmt.h"
#include "File.h"
#include "Log.h"
#include "util/logs.hpp"
#include "mutex.h"
#include "sysinfo.h"
#include "VirtualMemory.h"

View File

@ -1,4 +1,4 @@
#include "Log.h"
#include "util/logs.hpp"
#include "File.h"
#include "StrFmt.h"
#include "sema.h"
@ -279,9 +279,12 @@ void logs::listener::add(logs::listener* _new)
std::lock_guard lock(g_mutex);
// 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;
null = nullptr;
}
}

View File

@ -41,7 +41,7 @@
#endif
#include "sync.h"
#include "Log.h"
#include "util/logs.hpp"
LOG_CHANNEL(sig_log);
LOG_CHANNEL(sys_log, "SYS");

View File

@ -1,5 +1,5 @@
#include "stdafx.h"
#include "Utilities/Log.h"
#include "util/logs.hpp"
#include "VirtualMemory.h"
#ifdef _WIN32
#include <Windows.h>

View File

@ -1,7 +1,7 @@
#pragma once
#include "Utilities/types.h"
#include "Utilities/Log.h"
#include "util/logs.hpp"
#include <string>
#include <vector>

View File

@ -5,7 +5,7 @@
#include "Utilities/types.h"
#include "Utilities/File.h"
#include "Utilities/Log.h"
#include "util/logs.hpp"
LOG_CHANNEL(self_log, "SELF");

View File

@ -2,7 +2,7 @@
#error "XAudio2 can only be built on Windows."
#endif
#include "Utilities/Log.h"
#include "util/logs.hpp"
#include "Utilities/StrFmt.h"
#include "Emu/System.h"
#include "Emu/system_config.h"

View File

@ -28,7 +28,7 @@
#include "Utilities/StrFmt.h"
#include "Utilities/BEType.h"
#include "Utilities/BitField.h"
#include "Utilities/Log.h"
#include "util/logs.hpp"
#include "Utilities/JIT.h"
#include <unordered_map>

View File

@ -4,7 +4,7 @@
#include "PPUThread.h"
#include "PPUInterpreter.h"
#include "../Utilities/Log.h"
#include "util/logs.hpp"
#include <algorithm>
using namespace llvm;

View File

@ -1,7 +1,7 @@
#include "stdafx.h"
#include "GDB.h"
#include "Utilities/Log.h"
#include "util/logs.hpp"
#include "Utilities/StrUtil.h"
#include "Emu/Memory/vm.h"
#include "Emu/System.h"

View File

@ -5,7 +5,7 @@
#include "Utilities/hash.h"
#include "Utilities/mutex.h"
#include "Utilities/Log.h"
#include "util/logs.hpp"
#include "Utilities/span.h"
#include <deque>

View File

@ -1,6 +1,6 @@
#pragma once
#include "Utilities/Log.h"
#include "util/logs.hpp"
/**
* Ring buffer memory helper :
@ -115,7 +115,7 @@ public:
{
return (m_put_pos > 0) ? m_put_pos - 1 : m_size - 1;
}
virtual bool is_critical() const
{
const size_t guard_length = std::max(m_min_guard_size, m_largest_allocated_pool);

View File

@ -2,7 +2,7 @@
#include "GLHelpers.h"
#include "GLTexture.h"
#include "GLCompute.h"
#include "Utilities/Log.h"
#include "util/logs.hpp"
namespace gl
{

View File

@ -14,7 +14,7 @@
#include "Emu/system_config.h"
#include "Utilities/geometry.h"
#include "Utilities/Log.h"
#include "util/logs.hpp"
#define GL_FRAGMENT_TEXTURES_START 0
#define GL_VERTEX_TEXTURES_START (GL_FRAGMENT_TEXTURES_START + 16)

View File

@ -5,7 +5,7 @@
#include "Emu/Io/pad_config.h"
#include "evdev_joystick_handler.h"
#include "Utilities/Log.h"
#include "util/logs.hpp"
#include <functional>
#include <algorithm>

View File

@ -459,7 +459,7 @@
<ClInclude Include="..\Utilities\mutex.h" />
<ClInclude Include="..\Utilities\sema.h" />
<ClInclude Include="..\Utilities\sync.h" />
<ClInclude Include="..\Utilities\Log.h" />
<ClInclude Include="util\logs.hpp" />
<ClInclude Include="..\Utilities\File.h" />
<ClInclude Include="..\Utilities\Config.h" />
<ClInclude Include="..\Utilities\rXml.h" />

View File

@ -1024,7 +1024,7 @@
<ClInclude Include="..\Utilities\Timer.h">
<Filter>Utilities</Filter>
</ClInclude>
<ClInclude Include="..\Utilities\Log.h">
<ClInclude Include="util\logs.hpp">
<Filter>Utilities</Filter>
</ClInclude>
<ClInclude Include="Emu\RSX\Null\NullGSRender.h">

View File

@ -1,7 +1,7 @@
#pragma once
#include "settings.h"
#include "Utilities/Log.h"
#include "util/logs.hpp"
#include <QVariant>
#include <QSize>

View File

@ -1,7 +1,7 @@
#pragma once
#include "Utilities/File.h"
#include "Utilities/Log.h"
#include "util/logs.hpp"
#include "custom_dock_widget.h"
#include "find_dialog.h"

View File

@ -7,7 +7,7 @@
#include "stdafx.h"
#include "Utilities/Log.h"
#include "util/logs.hpp"
#include "Utilities/StrUtil.h"
#include "Emu/VFS.h"
#include "Emu/System.h"

View File

@ -3,7 +3,7 @@
#include "Emu/System.h"
#include "Utilities/File.h"
#include "Utilities/StrFmt.h"
#include "Utilities/Log.h"
#include "util/logs.hpp"
LOG_CHANNEL(gui_log, "GUI");

View File

@ -12,7 +12,7 @@
#include "Utilities/StrUtil.h"
#include "Utilities/File.h"
#include "Utilities/Log.h"
#include "util/logs.hpp"
#include <QRegExpValidator>
#include <QInputDialog>

View File

@ -25,7 +25,7 @@ namespace std { inline namespace literals { inline namespace chrono_literals {}}
#include "util/atomic.hpp"
#include "Utilities/StrFmt.h"
#include "Utilities/File.h"
#include "Utilities/Log.h"
#include "util/logs.hpp"
#include <cstdlib>
#include <cstring>

View File

@ -1,14 +1,18 @@
#pragma once
#include "types.h"
#include "StrFmt.h"
#include "util/atomic.hpp"
#include <cstdint>
#include <atomic>
#include <memory>
#include <string>
#include <vector>
#include <initializer_list>
#include "Utilities/StrFmt.h"
namespace logs
{
enum class level : uint
using u64 = std::uint64_t;
enum class level : unsigned
{
always, // Highest log severity (unused, cannot be disabled)
fatal,
@ -46,7 +50,7 @@ namespace logs
class listener
{
// Next listener (linked list)
atomic_t<listener*> m_next{};
std::atomic<listener*> m_next{};
friend struct message;
@ -84,7 +88,7 @@ namespace logs
#if __cpp_char8_t >= 201811
using char2 = char8_t;
#else
using char2 = uchar;
using char2 = unsigned char;
#endif
#define GEN_LOG_METHOD(_sev)\