/LoggerKit

A logger for Xcode

Primary LanguageSwiftMIT LicenseMIT

LoggerKit

LoggerKit

LoggerKit is a simple and fast logging framework for Swift that's easy to set up and customize. It's great for small or large projects.

Motivation

LoggerKit is designed to be a simple and universal logging library with support for multiple Xcode projects.

Features

  • Easy to use
  • Highly customizable
  • Provides clean information

Available Log Levels

  • Verbose
  • Info
  • Debug
  • Warning
  • Error
  • initLifeCycle
  • deinitLifeCycle

๐Ÿ“ฆ Installation

Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler.

  • Add this Swift package in Xcode using its Github repository url. (File > Swift Packages > Add Package Dependency...)
  • Add this URL https://github.com/VishwaiOSDev/LoggerKit.git and select Add Package
  • After adding it select LoggerKit.

๐Ÿš€ How to use

LoggerKit makes your life easier

Firstly, import the LoggerKit

import LoggerKit

For logging,

LoggerKit.verbose("Example of verbose log.")
LoggerKit.info("Something went wrong")
LoggerKit.debug("Debug mode enabled")
LoggerKit.warning("Warning, duplication warning.")
LoggerKit.error("Error, data didn't fetch properly.")
LoggerKit.initLifeCycle("ViewModel init", for: self)
LoggerKit.deinitLifeCycle("ViewModel deinit", for: self)

LoggerKit will provide clean information for you. Output for above code as follows:

๐Ÿ’œ๐Ÿ’œ LoggerKitTests.swift: 49 - Something went wrong! Dependency Error.
๐Ÿ’š๐Ÿ’š LoggerKitTests.swift: 46 - Something went wrong! Dependency Error.
๐Ÿ’›๐Ÿ’› LoggerKitTests.swift: 19 - Debug mode enabled
๐Ÿงก๐Ÿงก LoggerKitTests.swift: 23 - Warning, duplication warning.
โค๏ธโค๏ธ LoggerKitTests.swift: 45 - Something went wrong! Dependency Error.

License

LoggerKit is released under the MIT license.