Skip to content

Instantly share code, notes, and snippets.

@iamchiwon
Created August 27, 2019 08:02
Show Gist options
  • Select an option

  • Save iamchiwon/078d4c05444fe803bc2d5952ca3cb08e to your computer and use it in GitHub Desktop.

Select an option

Save iamchiwon/078d4c05444fe803bc2d5952ca3cb08e to your computer and use it in GitHub Desktop.
os_log 를 타입별로 구분해서 사용하기
extension OSLog {
private static var subsystem = Bundle.main.bundleIdentifier!
static let ui = OSLog(subsystem: subsystem, category: "UI")
static let network = OSLog(subsystem: subsystem, category: "Network")
}
os_log("Contact selected", log: .ui)
os_log("HTTP response: %@", log: .network, responseCode)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment