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 | |
// Global print & debugPrint function to print logs only in debug mode | |
// https://medium.com/macoclock/swift-print-only-in-debug-mode-c571d6173dfa | |
func print(_ object: Any...) { | |
#if DEBUG | |
for item in object { | |
Swift.print(item) | |
} |
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
// https://stackoverflow.com/questions/6552197/enable-and-disable-nslog-in-debug-mode | |
// http://www.cimgf.com/2009/01/24/dropping-nslog-in-release-builds/ | |
#ifdef DEBUG | |
#define NSLog(...) NSLog(__VA_ARGS__) | |
#else | |
#define NSLog(...) | |
#endif |