Skip to content

Instantly share code, notes, and snippets.

@bill350
Created July 26, 2018 12:11
Show Gist options
  • Save bill350/f044438cc050fb3cbe5eed86975540c8 to your computer and use it in GitHub Desktop.
Save bill350/f044438cc050fb3cbe5eed86975540c8 to your computer and use it in GitHub Desktop.
func osLogLevelRelated(to swiftyBeaverLogLevel: SwiftyBeaver.Level) -> OSLogType {
var logType: OSLogType
switch swiftyBeaverLogLevel {
case .debug:
logType = .debug
case .verbose:
logType = .default
case .info:
logType = .info
case .warning:
//We use "error" here because of 🔶 indicator in the Console
logType = .error
case .error:
//We use "fault" here because of 🔴 indicator in the Console
logType = .fault
}
return logType
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment