PureLogger is an elegant replacement of Swift.print()
in the Xcode project to use during the debugging.
pod 'PureLogger'
Just copy Source folder to your Xcode project.
Method #1 - Globally
After adding the framework to your project, you need to import the module in your AppDelegate class.
import PureLogger
Then add this line just below
let log = Log.shared
After this you can access log
istance across all project.
log.debug("Testing debug log")
Method #2 - Locally
After adding the framework to your project, you need to import the module in the every class, you wish to use the logger.
import PureLogger
Then you need to initialise the local logger like this
let log = Log()
After this you can access log
istance in the appropriate class.
Available methods
log.debug(...)
log.info(...)
log.warning(...)
log.error(...)
Also you can use such logic, if you want to print only input item itself without any additional information.
Log("Simple log")
Besides this, you can customize emoji, date format and other things at the output information to fit your demands 😉
If you have any questions or suggestions, feel free to open issue just at this project.
PureLogger and all its classes are available under the MIT license. See the LICENSE file for more info.