hw: Migrate logging macros (#3584)

* hw: Migrate logging macros

Use NGLOG instead of LOG prefixed macros for logging

* gpu: Remove unnecessary casting

At first this line without any casting gave an error. Without knowing which argument is causing the error, I just casted everything. After that forgot to check which argument is the one causing trouble.

* hw: Change format specifiers for the one missed
This commit is contained in:
Daniel Lim Wee Soong 2018-03-27 19:02:19 +08:00 committed by Merry
parent 3e8e011c33
commit 7abfdb164b
5 changed files with 64 additions and 58 deletions

View file

@ -36,7 +36,7 @@ inline void Read(T& var, const u32 addr) {
LCD::Read(var, addr);
break;
default:
LOG_ERROR(HW_Memory, "unknown Read%lu @ 0x%08X", sizeof(var) * 8, addr);
NGLOG_ERROR(HW_Memory, "unknown Read{} @ {:#010X}", sizeof(var) * 8, addr);
}
}
@ -65,7 +65,8 @@ inline void Write(u32 addr, const T data) {
LCD::Write(addr, data);
break;
default:
LOG_ERROR(HW_Memory, "unknown Write%lu 0x%08X @ 0x%08X", sizeof(data) * 8, (u32)data, addr);
NGLOG_ERROR(HW_Memory, "unknown Write{} {:#010X} @ {:#010X}", sizeof(data) * 8, (u32)data,
addr);
}
}
@ -89,13 +90,13 @@ void Init() {
AES::InitKeys();
GPU::Init();
LCD::Init();
LOG_DEBUG(HW, "initialized OK");
NGLOG_DEBUG(HW, "initialized OK");
}
/// Shutdown hardware
void Shutdown() {
GPU::Shutdown();
LCD::Shutdown();
LOG_DEBUG(HW, "shutdown OK");
NGLOG_DEBUG(HW, "shutdown OK");
}
} // namespace HW