Skip to content

Instantly share code, notes, and snippets.

@bill350
Created July 26, 2018 10:15
Show Gist options
  • Select an option

  • Save bill350/1a02ad9435e731b0da9a814dc0d190a7 to your computer and use it in GitHub Desktop.

Select an option

Save bill350/1a02ad9435e731b0da9a814dc0d190a7 to your computer and use it in GitHub Desktop.
import Foundation
import SwiftyBeaver
// direct access to the logger across the app
let logger = SwiftyBeaver.self
extension SwiftyBeaver {
static func setupConsole() {
let console = ConsoleDestination()
console.levelColor.verbose = "⚪️ "
console.levelColor.debug = "☑️ "
console.levelColor.info = "🔵 "
console.levelColor.warning = "🔶 "
console.levelColor.error = "🔴 "
#if DEBUG
console.minLevel = .verbose
#else
console.minLevel = .error
#endif
logger.addDestination(console)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment