Swiftpack.co -  martin-e91/MGELogger as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
martin-e91/MGELogger
A lightweight logger
.package(url: "https://github.com/martin-e91/MGELogger.git", from: "0.8.0")

MGELogger

A lightweight and easy to use logging module.

Example

To run the example project, clone this repo, and open MGELogger.xcworkspace from the iOS Example directory.

Usage

Add the import statement

import MGELogger

Create a Logger instance. You may create a global variable for convenient access all around the project.

let logger = Logger()

Then you can log your message with any level you need:

...
logger.debug(title: "Network Response", message: body.prettyPrinted)
...

Output:

[21-08-14 06:50:38601] ๐Ÿž DEBUG: NetworkProvider.swift:71: decodeBody():
Network Response: 
{
  "address": {
    "city": "Naples",
    "coordinates": {
      "latitude": 40.0,
      "longitude": 45.0
    },
    "country": "IT",
    "province": "NA",
    "street": "Via Toledo, 15"
   }
}

Requirements

Requires iOS 9.0 or above.

Installation

Add this to your project using Swift Package Manager. In Xcode that is simply: 'File > Swift Packages > Add Package Dependency...' paste this repo link and you're all set ๐Ÿ‘Œ๐Ÿพ.

Contributing

Feel free to give your contribution or open a new issue! ๐Ÿ˜„

Author

Martin Essuman (@martin-e91)

License

MGELogger is available under the MIT license. See the LICENSE file for more information.

GitHub

link
Stars: 1
Last commit: 5 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jackโ€™d and SCRUFF. We are two of the worldโ€™s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Submit a free job ad (while I'm testing this). The analytics numbers for this website are here.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics