diff --git a/msix/ubuntu-pro-agent-launcher/error.cpp b/msix/ubuntu-pro-agent-launcher/error.cpp index 009e7d111..fcc312c60 100644 --- a/msix/ubuntu-pro-agent-launcher/error.cpp +++ b/msix/ubuntu-pro-agent-launcher/error.cpp @@ -30,7 +30,7 @@ void LogSingleShot(std::filesystem::path const& logFilePath, auto const time = std::chrono::current_zone()->to_local(std::chrono::system_clock::now()); - std::ofstream logfile{logFilePath}; + std::ofstream logfile{logFilePath, std::ios::app}; logfile << std::format("{:%Y-%m-%d %T}: {}\n", time, message); }