Skip to content

Commit

Permalink
- update log function
Browse files Browse the repository at this point in the history
  • Loading branch information
abdullahselek committed Dec 20, 2016
1 parent f8ea6f0 commit 09a8b58
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Lighty/LightyLogger.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,19 @@ public class LightyLogger {
file: String = #file,
function: String = #function,
line: Int = #line) {
let trackedMessage = track(message: message)

let fileExtension = file.nsstring.lastPathComponent.nsstring.pathExtension
let fileName = file.nsstring.lastPathComponent.nsstring.deletingPathExtension

let trackedString = "\(fileName).\(fileExtension):\(line) \(function)"
let emoji = getAccessoryWithType(messageType: type)
print(emoji + " " + trackedMessage + " " + emoji)
print(emoji + " " + trackedString + " / " + message + " " + emoji)
}

}

private extension String {

var nsstring: NSString { return self as NSString }

}

0 comments on commit 09a8b58

Please sign in to comment.