mirror of
https://github.com/wiiu-env/PatchMemoryRelocationsModule.git
synced 2025-02-21 12:17:16 +01:00
Imrovde/fix logging
This commit is contained in:
parent
eb0f921e25
commit
d06f4049fa
@ -37,6 +37,8 @@ extern "C" {
|
||||
|
||||
#define DEBUG_FUNCTION_LINE_WRITE(FMT, ARGS...) LOG(WHBLogWritef, FMT, ##ARGS)
|
||||
|
||||
#define DEBUG_FUNCTION_LINE_WARN(FMT, ARGS...) LOG_EX_DEFAULT(WHBLogPrintf, "##WARN ## ", "", FMT, ##ARGS)
|
||||
|
||||
#define DEBUG_FUNCTION_LINE_ERR(FMT, ARGS...) LOG_EX_DEFAULT(WHBLogPrintf, "##ERROR## ", "", FMT, ##ARGS)
|
||||
|
||||
#define DEBUG_FUNCTION_LINE_ERR_LAMBDA(FILENAME, FUNCTION, LINE, FMT, ARGS...) LOG_EX(FILENAME, FUNCTION, LINE, WHBLogPrintf, "##ERROR## ", "", FMT, ##ARGS);
|
||||
@ -51,6 +53,8 @@ extern "C" {
|
||||
|
||||
#define DEBUG_FUNCTION_LINE_WRITE(FMT, ARGS...) while (0)
|
||||
|
||||
#define DEBUG_FUNCTION_LINE_WARN(FMT, ARGS...) LOG_EX_DEFAULT(OSReport, "##WARN ## ", "\n", FMT, ##ARGS)
|
||||
|
||||
#define DEBUG_FUNCTION_LINE_ERR(FMT, ARGS...) LOG_EX_DEFAULT(OSReport, "##ERROR## ", "\n", FMT, ##ARGS)
|
||||
|
||||
#define DEBUG_FUNCTION_LINE_ERR_LAMBDA(FILENAME, FUNCTION, LINE, FMT, ARGS...) LOG_EX(FILENAME, FUNCTION, LINE, OSReport, "##ERROR## ", "\n", FMT, ##ARGS);
|
||||
|
@ -31,7 +31,7 @@ WUMS_INTERNAL_HOOK_CLEAR_ALLOCATED_RPL_MEMORY() {
|
||||
// If an allocated rpl was not released properly (e.g. if something else calls OSDynload_Acquire without releasing it)
|
||||
// memory gets leaked. Let's clean this up!
|
||||
for (auto &addr : gAllocatedAddresses) {
|
||||
DEBUG_FUNCTION_LINE_ERR("Memory allocated by OSDynload was not freed properly, let's clean it up! (%08X)", addr);
|
||||
DEBUG_FUNCTION_LINE_WARN("Memory allocated by OSDynload was not freed properly, let's clean it up! (%08X)", addr);
|
||||
free((void *) addr);
|
||||
}
|
||||
gAllocatedAddresses.clear();
|
||||
@ -75,7 +75,6 @@ static void CustomDynLoadFree(void *addr) {
|
||||
}
|
||||
|
||||
WUMS_INTERNAL_GET_CUSTOM_RPL_ALLOCATOR() {
|
||||
DEBUG_FUNCTION_LINE_ERR("WUMS_INTERNAL_GET_CUSTOM_RPL_ALLOCATOR");
|
||||
return {CustomDynLoadAlloc, CustomDynLoadFree};
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user