Created
November 6, 2022 22:20
-
-
Save StewartLynch/addc916e2006c5ed5773f43ae560ac8f to your computer and use it in GitHub Desktop.
Print file, function and line along with the printed items
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
public func printDetail( _ items: Any..., | |
fileID: String = #fileID, | |
function: String = #function, | |
line: Int = #line, | |
separator: String = " ", | |
terminator: String = "\n") { | |
print("___________________________") | |
print(items.map{ "\($0)" }.joined(separator: separator)) | |
print( | |
""" | |
๐ \(fileID) ๐ | |
function: \(function) | |
line: \(line) | |
___________________________ | |
""" | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice code I will have to try it.