From af003d94f8e2fcf360d95847eb9ecce28978f02f Mon Sep 17 00:00:00 2001 From: elsid Date: Fri, 3 Feb 2023 01:26:43 +0100 Subject: [PATCH] Log error when failed to open stats file --- apps/openmw/engine.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/openmw/engine.cpp b/apps/openmw/engine.cpp index 94070527da..8fe63bc7b6 100644 --- a/apps/openmw/engine.cpp +++ b/apps/openmw/engine.cpp @@ -1,6 +1,8 @@ #include "engine.hpp" +#include #include +#include #include #include @@ -870,9 +872,10 @@ void OMW::Engine::go() { stats.open(path, std::ios_base::out); if (stats.is_open()) - Log(Debug::Info) << "Stats will be written to: " << path; + Log(Debug::Info) << "OSG stats will be written to: " << path; else - Log(Debug::Warning) << "Failed to open file for stats: " << path; + Log(Debug::Warning) << "Failed to open file to write OSG stats \"" << path + << "\": " << std::generic_category().message(errno); } // Setup profiler