Created
October 19, 2018 05:52
-
-
Save mrazam110/f7c37d2e3919c516e66f0974a7ecaaf8 to your computer and use it in GitHub Desktop.
Detail logging or debugPrint in 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
func log(_ message: Any, _ file: String = #file, _ line: Int = #line, _ function: String = #function) { | |
debugPrint("[\(file):\(line)] \(function)") | |
debugPrint(message) | |
debugPrint() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to use:
log("error")
log(object)