mirror of
https://github.com/apple/swift-log
synced 2026-11-24 03:47:49 +00:00
Add O_APPEND to flags (#45)
This commit is contained in:
1 parent
32e9fa5158
commit
5c135cd948
1 file changed
+1
-1
@@ -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)")
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user