Skip to content

Instantly share code, notes, and snippets.

@moveitonover
Created November 2, 2017 07:42
Show Gist options
  • Save moveitonover/b7a0818a42ad734d9b5c6d7a29bd5f1b to your computer and use it in GitHub Desktop.
Save moveitonover/b7a0818a42ad734d9b5c6d7a29bd5f1b to your computer and use it in GitHub Desktop.
Drop in replacement for `print` and `debugPrint` in Swift 4
//
// 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