mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
SQVM logging improvements
* Allow setting logging level in retail mode. * Also color log on error to the in-game console overlays when log level < 2.
This commit is contained in:
parent
0b3e4ff1f7
commit
27f9d6b110
@ -102,8 +102,11 @@ SQRESULT SQVM_PrintFunc(HSQUIRRELVM v, SQChar* fmt, ...)
|
||||
if (sq_showvmoutput->GetInt() > 0) {
|
||||
sqlogger->debug(vmStr);
|
||||
}
|
||||
if (sq_showvmoutput->GetInt() > 1 ||
|
||||
(g_bSQAuxError || g_bSQAuxBadLogic && v == g_pErrorVM))
|
||||
|
||||
// Always show script errors.
|
||||
bool bLogLevelOverride = (g_bSQAuxError || g_bSQAuxBadLogic && v == g_pErrorVM);
|
||||
|
||||
if (sq_showvmoutput->GetInt() > 1 || bLogLevelOverride)
|
||||
{
|
||||
bool bError = false;
|
||||
bool bColorOverride = false;
|
||||
@ -165,7 +168,7 @@ SQRESULT SQVM_PrintFunc(HSQUIRRELVM v, SQChar* fmt, ...)
|
||||
vmStr = std::regex_replace(vmStr, rxAnsiExp, "");
|
||||
iconsole->debug(vmStr);
|
||||
|
||||
if (sq_showvmoutput->GetInt() > 2)
|
||||
if (sq_showvmoutput->GetInt() > 2 || bLogLevelOverride)
|
||||
{
|
||||
ImVec4 color;
|
||||
if (bColorOverride)
|
||||
|
@ -184,8 +184,8 @@ void ConVar::Init(void) const
|
||||
// SQUIRREL |
|
||||
sq_showrsonloading = ConVar::Create("sq_showrsonloading" , "0", FCVAR_DEVELOPMENTONLY, "Logs all 'rson' files loaded by the SQVM ( !slower! ).", false, 0.f, false, 0.f, nullptr, nullptr);
|
||||
sq_showscriptloading = ConVar::Create("sq_showscriptloading", "0", FCVAR_DEVELOPMENTONLY, "Logs all scripts loaded by the SQVM to be pre-compiled ( !slower! ).", false, 0.f, false, 0.f, nullptr, nullptr);
|
||||
sq_showvmoutput = ConVar::Create("sq_showvmoutput" , "0", FCVAR_DEVELOPMENTONLY, "Prints the VM output to the console.", false, 0.f, false, 0.f, nullptr, "1 = Log to file. 2 = 1 + log to game console. 3 = 1 + 2 + log to overhead console.");
|
||||
sq_showvmwarning = ConVar::Create("sq_showvmwarning" , "0", FCVAR_DEVELOPMENTONLY, "Prints the VM warning output to the console.", false, 0.f, false, 0.f, nullptr, "1 = Log to file. 2 = 1 + log to game console and overhead console.");
|
||||
sq_showvmoutput = ConVar::Create("sq_showvmoutput" , "0", FCVAR_RELEASE, "Prints the VM output to the console.", false, 0.f, false, 0.f, nullptr, "1 = Log to file. 2 = 1 + log to game console. 3 = 1 + 2 + log to overhead console.");
|
||||
sq_showvmwarning = ConVar::Create("sq_showvmwarning" , "0", FCVAR_RELEASE, "Prints the VM warning output to the console.", false, 0.f, false, 0.f, nullptr, "1 = Log to file. 2 = 1 + log to game console and overhead console.");
|
||||
//-------------------------------------------------------------------------
|
||||
// NETCHANNEL |
|
||||
net_tracePayload = ConVar::Create("net_tracePayload" , "0", FCVAR_DEVELOPMENTONLY | FCVAR_CHEAT , "Log the payload of the send/recv datagram to a file on the disk.", false, 0.f, false, 0.f, nullptr, nullptr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user