Last active
July 16, 2021 07:08
-
-
Save StewartLynch/575bc8c37b6ff637e89eca9a10f46392 to your computer and use it in GitHub Desktop.
This file contains 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
// | |
// DebugPrint.swift | |
// Deep Links Test | |
// | |
// Created by Stewart Lynch on 2021-02-09. | |
// | |
import Foundation | |
enum DebugPrint { | |
#if DEBUG | |
static func location(_ items: Any..., | |
separator: String = " ", | |
terminator: String = "\n", | |
filePath: String = #filePath, | |
function: String = #function, | |
lineNumber: Int = #line, | |
column: Int = #column) { | |
let fileName = (filePath as NSString).lastPathComponent | |
print(""" | |
\(items) | |
\(fileName) | |
\(function) | |
line: \(lineNumber), col: \(column) | |
""") | |
} | |
#endif | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment