Code Monkey home page Code Monkey logo

logmanager's Introduction

LogManager

LogManager is a simple library to make it easier to add pretty debugging logging entries to an App project.

Support

If you find LogManager useful and would like to help support its continued development and maintenance, please consider making a small donation, especially if you are using it in a commercial product:

Buy Me A Coffee

It's through the support of contributors like yourself, I can continue to build, release and maintain high-quality, well documented Swift Packages like LogManager for free.

Installation

Swift Package Manager (Xcode 11 and above)

  1. In Xcode, select the File > Add Package Dependency… menu item.
  2. Paste https://github.com/Appracatappra/LogManager.git in the dialog box.
  3. Follow the Xcode's instruction to complete the installation.

Why not CocoaPods, or Carthage, or etc?

Supporting multiple dependency managers makes maintaining a library exponentially more complicated and time consuming.

Since, the Swift Package Manager is integrated with Xcode 11 (and greater), it's the easiest choice to support going further.

Overview

The library is broken into two main parts:

  • Debug - Use the static Debug class when you only want the comments to be printed when the app is compiled for Debug.
  • Log - Use the static Log class when you want the comments to be printed for both the Debug and Release versions of the app.

Both Debug and Log include the same set of functions: log, info, error and notice.

Log

static func log(_ message:String, suppressDuplicates:Bool = true)

Creates a simple log entry and optionally suppresses duplicate entries.

Info

static func info(subsystem:String, category:String, _ message:String)

Writes an Info message to the log with an optional subsystem and category used to identify and group log entries.

Error

static func error(subsystem:String, category:String, _ message:String)

Writes an Error message to the log with an optional subsystem and category used to identify and group log entries.

Notice

static func notice(subsystem:String, category:String, _ message:String)

Writes an Notice message to the log with an optional subsystem and category used to identify and group log entries.

Documentation

The Package includes full DocC Documentation for all features.

logmanager's People

Contributors

appracatappra avatar

Watchers

 avatar

Forkers

martinmaly21

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.