   }
 
   public func output(_ level: TKLog.LogLevel, identifier: String, message: String) {
-    NSLog("\(level.prefix) \(identifier): \(message)")
+    let message = "\(level.prefix) \(identifier): \(message)"
+    os_log("%@", log: OSLog(identifier: identifier), type: level.toOSLog, message)
   }
 }
 


import Foundation

/// A `TKLogger` is used by `TKLog` to perform the outputting and processing of log statements.
///
/// A default `TKConsoleLogger` is provided.

  }
}

extension TKLog.LogLevel {
  
  var toOSLog: OSLogType {
    switch self {
    case .verbose: return .default
    case .debug: return .debug
    case .info: return .info
    case .warning: return .info
    case .error: return .error
    }
  }
  
}

extension OSLog {
  
  public convenience init(identifier: String) {
    self.init(subsystem: Bundle.main.bundleIdentifier!, category: identifier)
  }
  
}

// MARK: - Server requests

extension TKLog {
