Skip to content
/ EasyLog Public

A lightweight library to help logging events in a clean and better way

Notifications You must be signed in to change notification settings

mal3k/EasyLog

Repository files navigation

EasyLog

A lightweight library to help logging events in a clean and better way :)

Example:

[2021-04-22 13:16:55] [ViewController.swift] ⎯ [Line 17] ⎯ viewDidLoad() 💚 ⎯ Log me

Currently, the library logs the following informations:

  • Timestamp
  • File name
  • Line number
  • Method name
  • Logged event status

Also, as of this version 1.0.2, the library supports the following events status:


Error: "❤️"
Debug: "💚" 
Info: "ℹ️" 
Verbose: "🔬" 
Warning: "⚠️" 
Severe: "🔥" 

Installation

The library is available as a Swift Package, Select "File\Swift Package\Add Package Dependency" then copy the lib URL "https://github.com/mal3k/EasyLog" when prompted.

Screenshot 2021-04-22 at 13 11 49

Screenshot 2021-04-22 at 13 12 31

How to use

Inside the file you want to use, import the library:

#import EasyLog

let logger  = Logger()
logger.d(object: "Log me")

The library is not usable as singleton. Usually, you instantiate the library and inject it as dependency for other objects where you want to use.

About

A lightweight library to help logging events in a clean and better way

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages