SLogger

main

Logging tool for swift project
Ninise/SLogger

SLogger

Swift Version Platform

SLogger is a lightweight and customizable Swift logging utility designed to simplify the process of incorporating logging into your Swift projects. It aims to provide a straightforward interface for developers to log messages at different levels, aiding in debugging, monitoring, and understanding the flow of their applications.

Features

  • Simplicity: Easily integrate logging into your Swift projects with minimal setup.
  • Flexibility: Customize log messages, include contextual information, and categorize logs with tags.
  • Performance: Designed for efficiency with conditional compilation to log only in DEBUG builds.
  • Readability: Log messages include contextual details like file name, function, and line number for better traceability.

Usage

  1. Import the package
import SLogger  
  1. Quick and easy usage
Log.info("info", tag: "LOGIN")
Log.debug("debug")
Log.warning("info")
Log.error("error")
Log.verbose("verbose")
  1. Output
[ℹ️ INFO ℹ️] info  ContentView.swift:23 body
[🍀 DEBUG 🍀] debug  ContentView.swift:24 body
[⚠️ WARN ⚠️] info  ContentView.swift:25 body
[🚨 ERROR 🚨] error  ContentView.swift:26 body
[👀 VERBOSE 👀] verbose  ContentView.swift:27 body

Requirements

  • Swift 5.0+

Installation

Swift Package Manager

SLogger is available through Swift Package Manager.

To add package go to File -> Swift Packages -> Add Package Dependancy

https://github.com/Ninise/SLogger.git

Description

  • Swift Tools 5.9.0
View More Packages from this Author

Dependencies

  • None
Last updated: Fri Apr 12 2024 07:45:00 GMT-0900 (Hawaii-Aleutian Daylight Time)