Created
May 29, 2018 09:36
-
-
Save kristofk/e174aaa88e046b6e2e4e20c75d1c5f06 to your computer and use it in GitHub Desktop.
Prints out the name of the function and the file it is located in! Good to track the flow of the app.
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 testPrint(function: String, path: String) { | |
| let pathElements = path.split(separator: "/") | |
| print("TEST: \(function) -> \(pathElements.last!)") | |
| } | |
| // Callsite: testPrint(function: #function, path: #file) | |
| // Filter in the console: test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment