r5sdk/r5dev/engine/sys_dll.cpp
Kawe Mazidjatari 3f8476db88 Logging system light refactor
* Use responceid from server to determine in which context to log.
* Moved all script loggers from combined enums to minus instead (SERVER = -3, CLIENT = -2, UI = -1 SERVER_CODE = 0, etc), this makes it much easier to align stuff in combined systems such as the RUI logger or NetMsg().
* Color log networked RCON messages properly on the client.
* Added dedicated logger for all received RCON messages (net_console.log).
* Log commands submitted through in-game console (allows for easier debugging when going through log files).
2022-08-03 18:34:44 +02:00

29 lines
873 B
C++

#include "core/stdafx.h"
#include "engine/sys_dll.h"
//-----------------------------------------------------------------------------
// Sys_Error_Internal
//
//-----------------------------------------------------------------------------
int HSys_Error_Internal(char* fmt, va_list args)
{
char buffer[2048]{};
Error(eDLL_T::COMMON, "_______________________________________________________________\n");
Error(eDLL_T::COMMON, "] ENGINE ERROR ################################################\n");
vsprintf(buffer, fmt, args);
Error(eDLL_T::COMMON, "%s\n", buffer);
///////////////////////////////////////////////////////////////////////////
return Sys_Error_Internal(fmt, args);
}
void SysDll_Attach()
{
DetourAttach((LPVOID*)&Sys_Error_Internal, &HSys_Error_Internal);
}
void SysDll_Detach()
{
DetourDetach((LPVOID*)&Sys_Error_Internal, &HSys_Error_Internal);
}