From e97d4e0ce121e0130a2a8c17b9b49394b385c1d1 Mon Sep 17 00:00:00 2001 From: "iAchieved.it" Date: Sat, 11 Jun 2016 21:56:55 -0500 Subject: [PATCH] Update Logging.swift Newline for lines logged to file --- Sources/Logging.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Logging.swift b/Sources/Logging.swift index 40a2675..b57d766 100644 --- a/Sources/Logging.swift +++ b/Sources/Logging.swift @@ -69,10 +69,10 @@ public func slogToFile(atPath path:String, append:Bool = false) { func SLog(logLevel:SLogLevel, logString:String) { let date = NSDate() - let log = "\(date) - " + stringForLogLevel(logLevel:logLevel) + " - " + logString + let log = "\(date) - " + stringForLogLevel(logLevel:logLevel) + " - " + logString + "\n" let appLogLevel = slogLevel.rawValue if (appLogLevel >= logLevel.rawValue) { - print(log) + print(log, terminator:"") if let logFilePath = slogFilePath, let fileHandle = NSFileHandle(forWritingAtPath:logFilePath), let data = log.data(using:NSUTF8StringEncoding) {