From d7f875cf88fe3e0f264a600198c54b2ac37e59fe Mon Sep 17 00:00:00 2001 From: christophhagen Date: Tue, 26 May 2020 16:06:42 +0200 Subject: [PATCH] Continue logging at end of file --- Sources/App/Log.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/App/Log.swift b/Sources/App/Log.swift index 96e2b7e..9eac9e2 100644 --- a/Sources/App/Log.swift +++ b/Sources/App/Log.swift @@ -33,7 +33,8 @@ enum Log { try "[\(date)] Failed to start log.\n".write(to: url, atomically: false, encoding: .utf8) return } - file?.write("[\(date)] Logging started.\n".data(using: .utf8)!) + f.seekToEndOfFile() + f.write("[\(date)] Logging started.\n".data(using: .utf8)!) file = f }