Skip to content

Instantly share code, notes, and snippets.

@skreutzberger
Created September 20, 2016 06:15
Show Gist options
  • Save skreutzberger/7c396573796473ed1be2c6d15cafed34 to your computer and use it in GitHub Desktop.
Save skreutzberger/7c396573796473ed1be2c6d15cafed34 to your computer and use it in GitHub Desktop.
Colored level emojis in Xcode 8 & Swift 2.3
// set custom level strings to add color
let console = ConsoleDestination()
console.levelString.Verbose = "💜 VERBOSE"
console.levelString.Debug = "💚 DEBUG"
console.levelString.Info = "💙 INFO"
console.levelString.Warning = "💛 WARNING"
console.levelString.Error = "❤️ ERROR"
@t2ac32
Copy link

t2ac32 commented Mar 21, 2017

Verbose, Debug, Info, Warning, Error. Shall be replace by:
verbose, debug, info, warning, error. (Xcode 8.2.1)

@shtnkgm
Copy link

shtnkgm commented Jul 12, 2019

If you want to change only emoji, you can do the following:

console.levelColor.verbose = "🐷"
console.levelColor.debug = "🛠️"
console.levelColor.info = "ℹ️"
console.levelColor.warning = "⚠️"
console.levelColor.error = "💥"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment