mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Lock filesystem 'read' logs behind a cvar
Locked behind cvar as loading a single map already causes 500kb 'read' logs.
This commit is contained in:
parent
793fcd62f2
commit
9978227915
@ -15,9 +15,18 @@
|
||||
//---------------------------------------------------------------------------------
|
||||
void CBaseFileSystem::Warning(CBaseFileSystem* pFileSystem, FileWarningLevel_t level, const char* pFmt, ...)
|
||||
{
|
||||
if (level >= FileWarningLevel_t::FILESYSTEM_WARNING_REPORTALLACCESSES)
|
||||
{
|
||||
// Logging reads is very verbose! Explicitly toggle..
|
||||
if (!fs_showAllReads || !fs_showAllReads->GetBool())
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
va_list args;
|
||||
va_start(args, pFmt);
|
||||
CoreMsgV(LogType_t::LOG_WARNING, static_cast<LogLevel_t>(fs_show_warnings->GetInt()), eDLL_T::FS, "filesystem", pFmt, args);
|
||||
CoreMsgV(LogType_t::LOG_WARNING, static_cast<LogLevel_t>(fs_showWarnings->GetInt()), eDLL_T::FS, "filesystem", pFmt, args);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
|
@ -200,7 +200,7 @@ void ConVar::Init(void)
|
||||
#endif // !DEDICATED
|
||||
//-------------------------------------------------------------------------
|
||||
// FILESYSTEM |
|
||||
fs_show_warnings = ConVar::Create("fs_show_warnings" , "0", FCVAR_DEVELOPMENTONLY, "Logs the FileSystem warnings to the console, filtered by 'fs_warning_level' ( !slower! ).", true, 0.f, true, 2.f, nullptr, "1 = log to console. 2 = 1 + log to notify.");
|
||||
fs_showWarnings = ConVar::Create("fs_showWarnings" , "0", FCVAR_DEVELOPMENTONLY, "Logs the FileSystem warnings to the console, filtered by 'fs_warning_level' ( !slower! ).", true, 0.f, true, 2.f, nullptr, "1 = log to console. 2 = 1 + log to notify.");
|
||||
fs_packedstore_entryblock_stats = ConVar::Create("fs_packedstore_entryblock_stats" , "0", FCVAR_DEVELOPMENTONLY, "Logs the stats of each file entry in the VPK during decompression ( !slower! ).", false, 0.f, false, 0.f, nullptr, nullptr);
|
||||
fs_packedstore_workspace = ConVar::Create("fs_packedstore_workspace" , "platform/ship/", FCVAR_DEVELOPMENTONLY, "Determines the current VPK workspace.", false, 0.f, false, 0.f, nullptr, nullptr);
|
||||
fs_packedstore_compression_level = ConVar::Create("fs_packedstore_compression_level", "default", FCVAR_DEVELOPMENTONLY, "Determines the VPK compression level.", false, 0.f, false, 0.f, nullptr, "fastest faster default better uber");
|
||||
@ -257,6 +257,7 @@ void ConVar::InitShipped(void)
|
||||
#endif // !CLIENT_DLL
|
||||
developer = g_pCVar->FindVar("developer");
|
||||
fps_max = g_pCVar->FindVar("fps_max");
|
||||
fs_showAllReads = g_pCVar->FindVar("fs_showAllReads");
|
||||
#ifndef DEDICATED
|
||||
cl_threaded_bone_setup = g_pCVar->FindVar("cl_threaded_bone_setup");
|
||||
#endif // !DEDICATED
|
||||
|
@ -177,7 +177,8 @@ ConVar* origin_disconnectWhenOffline = nullptr;
|
||||
#endif // !DEDICATED
|
||||
//-----------------------------------------------------------------------------
|
||||
// FILESYSTEM |
|
||||
ConVar* fs_show_warnings = nullptr;
|
||||
ConVar* fs_showWarnings = nullptr;
|
||||
ConVar* fs_showAllReads = nullptr;
|
||||
ConVar* fs_packedstore_entryblock_stats = nullptr;
|
||||
ConVar* fs_packedstore_workspace = nullptr;
|
||||
ConVar* fs_packedstore_compression_level = nullptr;
|
||||
|
@ -173,7 +173,8 @@ extern ConVar* origin_disconnectWhenOffline;
|
||||
#endif // !DEDICATED
|
||||
//-------------------------------------------------------------------------
|
||||
// FILESYSTEM |
|
||||
extern ConVar* fs_show_warnings;
|
||||
extern ConVar* fs_showWarnings;
|
||||
extern ConVar* fs_showAllReads;
|
||||
extern ConVar* fs_packedstore_entryblock_stats;
|
||||
extern ConVar* fs_packedstore_workspace;
|
||||
extern ConVar* fs_packedstore_compression_level;
|
||||
|
Loading…
x
Reference in New Issue
Block a user