From 5c135cd9481b8b6aa293bb1551e761114e57d45d Mon Sep 17 00:00:00 2001 From: Thomas Krajacic Date: Tue, 19 Feb 2019 12:44:24 +0100 Subject: [PATCH] Add O_APPEND to flags (#45) --- Sources/ExampleImplementation/FileLogHandler.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/ExampleImplementation/FileLogHandler.swift b/Sources/ExampleImplementation/FileLogHandler.swift index 009c952..2b038a5 100644 --- a/Sources/ExampleImplementation/FileLogHandler.swift +++ b/Sources/ExampleImplementation/FileLogHandler.swift @@ -53,7 +53,7 @@ private class FileHandler { init() { self.path = "/tmp/log-\(UUID().uuidString).txt" - self.fd = open(self.path, O_WRONLY | O_CREAT, 0o666) + self.fd = open(self.path, O_WRONLY | O_CREAT | O_APPEND, 0o666) assert(self.fd > 0, "could not open \(self.path)") print("writing logs to \(self.path)") }