From edce22147348beb3be9aab332c3be9a9040ec9e6 Mon Sep 17 00:00:00 2001 From: m-aXimilian Date: Wed, 28 May 2025 21:39:18 +0200 Subject: [PATCH] fix logger path for non-windows --- src/main.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 1955dc2..f9b1d80 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -11,13 +11,16 @@ int main(int argc, char** argv) using namespace pixelarium::utils::log; using namespace std; cout << "ok\n"; - - unique_ptr logger = make_unique(string(getenv("APPDATA")) + "/pixelarium/logfile.log", "default"); + unique_ptr logger; +#ifdef _WIN32 + logger = make_unique(string(getenv("APPDATA")) + "/pixelarium/logfile.log", "default"); +#else + logger = make_unique(std::string(getenv("HOME")) + "/.cache/sutura/log.log", "default"); +#endif auto app = pixelarium::ui::AppGLFW(logger); - // auto app = pixelarium::ui::AppGLFW(); logger->Info(std::format("Starting Application {}", PIXELARIUM_TITLE)); logger->Error("Starting Application"); return app.Run(); -} \ No newline at end of file +}