fix cyrillic in file path (Windows)

This commit is contained in:
clasher113 2026-10-20 14:53:27 +03:00
parent ee41e058a9
commit f8101011a0
7 changed files with 61 additions and 17 deletions

View file

@ -68,8 +68,8 @@ static void write(
}
}
void Logger::init(const std::string& filename) {
file.open(filename);
void Logger::init(const std::filesystem::path& path) {
file.open(path);
time_t tm = std::time(nullptr);
std::stringstream ss;

View file

@ -1,6 +1,7 @@
#pragma once
#include <sstream>
#include <filesystem>
namespace debug {
enum class LogLevel { print, debug, info, warning, error };
@ -27,7 +28,7 @@ namespace debug {
class Logger {
std::string name;
public:
static void init(const std::string& filename);
static void init(const std::filesystem::path& path);
static void flush();
Logger(const std::string& name) : name(name) {