Skip to content

Instantly share code, notes, and snippets.

@yannxou
Created June 7, 2024 09:54
Show Gist options
  • Save yannxou/aab83dd1363ce7b8d7929ee2be15c9f7 to your computer and use it in GitHub Desktop.
Save yannxou/aab83dd1363ce7b8d7929ee2be15c9f7 to your computer and use it in GitHub Desktop.
xcode disable logging in production
func customLog(_ category: String) -> OSLog {
#if DEBUG
return OSLog(subsystem: Bundle.main.bundleIdentifier!, category: category)
#else
return OSLog.disabled
#endif
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment