common: Rewrite logging based on cut down citra logger (#86)

* common: Rewrite logging based on cut down Citra logger

* code: Misc fixes

* core: Bring back tls handler

* linker: Cleanup

* config: Remove log level

* logging: Enable console output by default

* core: Fix windows build
This commit is contained in:
GPUCode 2024-02-28 00:10:34 +02:00 committed by GitHub
parent b3084646a8
commit 79d6c8a377
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
70 changed files with 3212 additions and 1541 deletions

View file

@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include "common/log.h"
#include "common/logging/log.h"
#include "core/aerolib/aerolib.h"
#include "core/aerolib/stubs.h"
@ -22,13 +22,12 @@ namespace Core::AeroLib {
constexpr u32 MAX_STUBS = 128;
u64 UnresolvedStub() {
LOG_ERROR("Unresolved Stub: called, returning zero to {}\n", __builtin_return_address(0));
LOG_ERROR(Core, "Returning zero to {}", __builtin_return_address(0));
return 0;
}
static u64 UnknownStub() {
LOG_ERROR("Stub: Unknown (nid: Unknown) called, returning zero to {}\n",
__builtin_return_address(0));
LOG_ERROR(Core, "Returning zero to {}", __builtin_return_address(0));
return 0;
}
@ -39,10 +38,10 @@ template <int stub_index>
static u64 CommonStub() {
auto entry = stub_nids[stub_index];
if (entry) {
LOG_ERROR("Stub: {} (nid: {}) called, returning zero to {}\n", entry->name, entry->nid,
LOG_ERROR(Core, "Stub: {} (nid: {}) called, returning zero to {}", entry->name, entry->nid,
__builtin_return_address(0));
} else {
LOG_ERROR("Stub: Unknown (nid: {}) called, returning zero to {}\n",
LOG_ERROR(Core, "Stub: Unknown (nid: {}) called, returning zero to {}",
stub_nids_unknown[stub_index], __builtin_return_address(0));
}
return 0;