Skip to content

Commit

Permalink
Update Logging.swift
Browse files Browse the repository at this point in the history
Newline for lines logged to file
  • Loading branch information
iachievedit authored Jun 12, 2016
1 parent ab9ee9e commit e97d4e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/Logging.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit e97d4e0

Please sign in to comment.