Emoji-Logger

Overview
Light weight Swift console logger with sevirity levels and built in Emojis
Installation
Manually
- Clone this git
- Drag Logger.swift file into xCode
- Select “Copy Files” from dialog
CocoaPods
Add the following line to your Podfile:
pod 'Emoji-Logger'
Carthage
Add the following line to your Cartfile:
github "alongenosar/Emoji-Logger"
Usage
Swift Examples.
Set Logger sevirity output level
Logger.logLevel = .info
Log with sevirity ‘info’
Logger.log(level:.info,"message","more information")
//You can also omit the level as .info is the default sevirity level
Logger.log("message","more information")
//Or
Logger.info("message","more information")
In the Debug window this will result with
🔵info: message more information
Log with sevirity ‘warning’
Logger.log(level:.warning,"warning message","more warning information")
//Or
Logger.warning("warning message","more warning information")
In the Debug window this will result with:
🔶warning: warning message more warning information
Log with sevirity ‘error’
Logger.log(level:.error,"error message,","more stuff")
//Or
Logger.error("error message,","more stuff")
In the Debug window this will result with
🔴error: error message, more stuff
Override message prefix regardless to its sevirity level
Logger.log("apple message",["foo:"bar"],prefixOverride:"🍏apple:")
in debug area
🍏apple: apple message {"foo":"bar"}
Change level prefix
Logger.set(prefix: "** ERROR **", forLevel: .error)
Logger.error("error message,"more stuff")
//in debug area
** ERROR ** error message, more stuff
Mute/Unmute level: Suppresses logs from a certain level/s
Logger.mute(level:.info)
Logger.unmute(level.info
Logger.muteAllBut(level:.info)
Logger.unmuteAll()
Emoji-Logger
Overview
Light weight Swift console logger with sevirity levels and built in Emojis
Installation
Manually
CocoaPods
Add the following line to your Podfile:
Carthage
Add the following line to your Cartfile:
Usage
Swift Examples.
Set Logger sevirity output level
Log with sevirity ‘info’
In the Debug window this will result with
Log with sevirity ‘warning’
In the Debug window this will result with:
Log with sevirity ‘error’
In the Debug window this will result with
Override message prefix regardless to its sevirity level
in debug area
Change level prefix
Mute/Unmute level: Suppresses logs from a certain level/s