Created
January 13, 2018 03:37
-
-
Save adsl99801/8ef8a2c98e2663ed8834bac634be7ab6 to your computer and use it in GitHub Desktop.
CommonUtils.printLog
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 | |
class CommonUtils{ | |
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