Skip to content

Instantly share code, notes, and snippets.

@mono0926
Created September 27, 2016 05:03
Show Gist options
  • Select an option

  • Save mono0926/d37cf1e4af6a9b291864dfd7b0e538f4 to your computer and use it in GitHub Desktop.

Select an option

Save mono0926/d37cf1e4af6a9b291864dfd7b0e538f4 to your computer and use it in GitHub Desktop.
let emojiLogFormatter = PrePostFixLogFormatter()
emojiLogFormatter.apply(prefix: "🗯🗯🗯 ", postfix: " 🗯🗯🗯", to: .verbose)
emojiLogFormatter.apply(prefix: "🔹🔹🔹 ", postfix: " 🔹🔹🔹", to: .debug)
emojiLogFormatter.apply(prefix: "ℹ️ℹ️ℹ️ ", postfix: " ℹ️ℹ️ℹ️", to: .info)
emojiLogFormatter.apply(prefix: "⚠️⚠️⚠️ ", postfix: " ⚠️⚠️⚠️", to: .warning)
emojiLogFormatter.apply(prefix: "‼️‼️‼️ ", postfix: " ‼️‼️‼️", to: .error)
emojiLogFormatter.apply(prefix: "💣💣💣 ", postfix: " 💣💣💣", to: .severe)
log.formatters = [emojiLogFormatter]
@mono0926
Copy link
Copy Markdown
Author

@Ohad-Maor
Copy link
Copy Markdown

Thanks !

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