logging| make crit errors obvious

This commit is contained in:
Martin Baliet 2024-03-20 16:56:50 +01:00
parent fd5ca5531e
commit cc93620a90

View File

@ -87,10 +87,14 @@ void* __registerLoggingModule(std::wstring&& name) {
return pModule;
}
void deinit() {
void flush() {
P7_Client_Flush(*getClient());
}
void flushExceptional() {
P7_Exceptional_Flush();
}
uint8_t isIgnored(void* module, eTrace_Level level) {
return static_cast<uint8_t>((*getTrace())->Get_Verbosity(module)) <= static_cast<typename std::underlying_type<__Log::eTrace_Level>::type>(level);
}
@ -102,8 +106,9 @@ void __log(eTrace_Level level, void* hmodule, unsigned short i_wLine, const char
if (static_cast<typename std::underlying_type<__Log::eTrace_Level>::type>(level) >=
static_cast<typename std::underlying_type<__Log::eTrace_Level>::type>(eTrace_Level::err)) {
printf("Critical Error:");
vwprintf(i_pFormat, args);
printf("\n");
printf("\nExiting\n");
}
(*getTrace())