log files moved under log folder

This commit is contained in:
d1str4ught
2025-08-27 14:36:08 +02:00
parent 5aad7c88f5
commit a479d5a57b
3 changed files with 9 additions and 4 deletions

View File

@@ -5,6 +5,7 @@
#include "Debug.h"
#include "Singleton.h"
#include "Timer.h"
#include <filesystem>
const DWORD DEBUG_STRING_MAX_LEN = 1024;
@@ -28,7 +29,7 @@ class CLogFile : public CSingleton<CLogFile>
void Initialize()
{
m_fp = fopen("log.txt", "w");
m_fp = fopen("log/log.txt", "w");
}
void Write(const char * c_pszMsg)
@@ -306,8 +307,12 @@ void LogFilef(const char * c_szMessage, ...)
void OpenLogFile(bool bUseLogFIle)
{
if (!std::filesystem::exists("log")) {
std::filesystem::create_directory("log");
}
#ifndef _DISTRIBUTE
freopen("syserr.txt", "w", stderr);
freopen("log/syserr.txt", "w", stderr);
if (bUseLogFIle)
{

View File

@@ -44,7 +44,7 @@ LONG __stdcall EterExceptionFilter(_EXCEPTION_POINTERS* pExceptionInfo)
HANDLE hProcess = GetCurrentProcess();
HANDLE hThread = GetCurrentThread();
fException = fopen("ErrorLog.txt", "wt");
fException = fopen("log/ErrorLog.txt", "wt");
if (fException)
{
char module_name[256];

View File

@@ -144,7 +144,7 @@ bool PackInitialize(const char * c_pszFolder)
{
NANOBEGIN
if (_access(c_pszFolder, 0) != 0)
return true;
return false;
std::string stFolder(c_pszFolder);
stFolder += "/";