Skip to content

Instantly share code, notes, and snippets.

@StewartLynch
Last active July 16, 2021 07:08
Show Gist options
  • Save StewartLynch/575bc8c37b6ff637e89eca9a10f46392 to your computer and use it in GitHub Desktop.
Save StewartLynch/575bc8c37b6ff637e89eca9a10f46392 to your computer and use it in GitHub Desktop.
//
// 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