Last active
July 19, 2017 06:59
-
-
Save EyreFree/b5ad1317eea302fb653bf6172e2e728d to your computer and use it in GitHub Desktop.
printLog.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
func printLog<T>(_ message: T, | |
file: String = #file, | |
method: String = #function, | |
line: Int = #line) | |
{ | |
#if DEBUG | |
print("\((file as NSString).lastPathComponent)[\(line)], \(method): \(message)") | |
#endif | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment