Introduce CLogger::ScopedReplacement and FileLogger

Comments By: @sera, @vladislavbelov, @Stan
Differential Revision: https://code.wildfiregames.com/D5167
This was SVN commit r27953.
This commit is contained in:
phosit
2023-11-23 20:42:18 +00:00
parent 63a4799f56
commit 949be94aab
6 changed files with 82 additions and 49 deletions
+8
View File
@@ -643,6 +643,14 @@ static void RunGameOrAtlas(const PS::span<const char* const> argv)
{
g_Shutdown = ShutdownType::None;
// Do this as soon as possible, because it chdirs and will mess up the error reporting if
// anything crashes before the working directory is set.
InitVfs(args);
// This must come after VFS init, which sets the current directory (required for finding our
// output log files).
FileLogger logger;
if (!Init(args, flags))
{
flags &= ~INIT_MODS;