Latest 1.0.1
Homepage https://github.com/dcortes22/DCLogger
License MIT
Platforms ios 9.0, tvos 9.0
Authors

CI Status
Version
License
Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

  • iOS 10.0+
  • Xcode 9.0+
  • Swift 4.0+

Installation

DCLogger is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'DCLogger'

How to Use?

Make sure to import the DCLogger on your class. DCLogger provides different log types based on your needs.

DCLogger.info("View Did Load")

Prints:

2018-07-06T00:22:25.062Z [UI][ViewController.swift#viewDidLoad()#18]Sample - ℹ️ Info: View Did Load

The available logs types are:

  • Info
  • Debug
  • Warning
  • Error

Configuration

DCLogger provides a basic configuration for your logs:

DCLogger.tag = "YourLogTag"
DCLogger.level = .info //Default log level
DCLogger.ouput = .debuggerConsole // .deviceConsole

How to read log information?

DCLogger provides usefull information on your logs, example using the following output:

2018-07-06T00:22:25.062Z [UI][ViewController.swift#viewDidLoad()#18]Sample - ℹ️ Info: View Did Load
  • 2018-07-06T00:22:25.062Z: Output Date Time
  • [UI]: Current thread, UI means Main Thread, BG means Background Thread
  • ViewController.swif: File
  • viewDidLoad(): Function
  • 18: Line number
  • Sample: Tag (optional)
  • ℹ️ Info:: Log Type
  • View Did Load: Message

Author

David Cortes, @dcortes22

License

DCLogger is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "DCLogger",
    "version": "1.0.1",
    "summary": "A lightweight logger tool for your iOS/tvOS app.",
    "description": "DCLogger allow you to get pretty log information.",
    "homepage": "https://github.com/dcortes22/DCLogger",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "dcortes22": "[email protected]gmail.com"
    },
    "source": {
        "git": "https://github.com/dcortes22/DCLogger.git",
        "tag": "1.0.1"
    },
    "social_media_url": "https://twitter.com/dcortes22",
    "platforms": {
        "ios": "9.0",
        "tvos": "9.0"
    },
    "source_files": "DCLogger/Classes/**/*",
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This