Created
November 2, 2017 07:42
-
-
Save moveitonover/b7a0818a42ad734d9b5c6d7a29bd5f1b to your computer and use it in GitHub Desktop.
Drop in replacement for `print` and `debugPrint` in Swift 4
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
// | |
// Logger.swift | |
// | |
// Drop in replacement for `print` and `debugPrint`. | |
// | |
func print(_ items: Any..., separator: String = " ", terminator: String = "\n") { | |
#if DEBUG | |
Swift.print(items, separator: separator, terminator: terminator) | |
#endif | |
} | |
func debugPrint(_ items: Any..., separator: String = " ", terminator: String = "\n") { | |
#if DEBUG | |
Swift.debugPrint(items, separator: separator, terminator: terminator) | |
#endif | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment