Last active
January 25, 2022 08:09
-
-
Save deya-eldeen/5bd2f442493f1a14a19256de8f736ef0 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
import Foundation | |
public func print(_ items: Any..., separator: String = " ", terminator: String = "\n") { | |
#if DEBUG | |
let output = items.map { "\n⚠️ YourAppName \($0)" }.joined(separator: separator) | |
Swift.print(output, terminator: terminator) | |
#else | |
if(Environment.allowPrint == "1"){ | |
let output = items.map { "\n⚠️ YourAppName \($0)" }.joined(separator: separator) | |
Swift.print(output, terminator: terminator) | |
} | |
#endif | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment