A tiny, simple and emojified logger built in Swift.
Please note that the source file has to be placed in the main bundle of your application project otherwise preprocessor directives wont work.
This implementation uses the default Swift compilation flag under Active Compilation Conditions — DEBUG flag.
So, installation of this logger is done manually.
-
Clone or download the
LitenLogger
repository. -
Drag LitenLogger/LitenLogger.swift and drop it into your project directory.
Log.verbose("Hello, LitenLogger")
Log.debug("Document saved successfully!")
Log.info("Date right now: \(Date())")
Log.warning("Force Cast Violation:Force casts should be avoided.")
Log.error(error.localizedDescription + " while saving comment")
Log.fatal("May Day! May Day!")
output
Inspiration & Learning
https://medium.com/@sauvik_dolui/developing-a-tiny-logger-in-swift-7221751628e6
MIT License, Copyright (c) 2019 Ajith R Nayak