sync() after write to avoid losing file data on power off.

This commit is contained in:
Robin Davies
2024-09-01 09:53:32 -04:00
parent abb8a1a53c
commit b8c4fafd3a
21 changed files with 102 additions and 34 deletions
+2 -1
View File
@@ -6,6 +6,7 @@
#include <stdexcept>
#include "ss.hpp"
#include <chrono>
#include "ofstream_synced.hpp"
namespace impl {
@@ -72,7 +73,7 @@ public:
f << "trace: " << message << std::endl;
}
private:
std::ofstream f;
pipedal::ofstream_synced f;
};
class SystemdDBusLogger : public IDBusLogger {