Log4G 0.3.0

Log4G 0.3.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Apr 2018
SPMSupports SPM

Maintained by zixun.



Log4G 0.3.0

  • By
  • zixun

Log4G

Version License Platform Carthage compatible

Simple, lightweight logging framework written in Swift

Context

This library is derived from the GodEye project which can automaticly disply Log,Crash,Network,ANR,Leak,CPU,RAM,FPS,NetFlow,Folder and etc with one line of code. Just like god opened his eyes

Features

  • Log type support: log,warning,error.
  • Automaticly get log‘s file, line, function and thread.
  • Allow multiple delegate listeners to monitor log behavior.

Installation

CocoaPods

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

pod "Log4G"

Carthage

Or, if you’re using Carthage, add SwViewCapture to your Cartfile:

github "zixun/Log4G"

Usage

Log a log type message

Log4G.log("message")

Log a warning type message

Log4G.warning("message")

Log an error type message

Log4G.error("message")

Add to the log delegate listener

Log4G.add(delegate: self)

And implement delegate of Log4GDelegate:

func log4gDidRecord(with model:LogModel) {
    //Some Monitor Action
}

Remove frome the log delegate listener

Log4G.remove(delegate: self)

Author

name: 陈奕龙

twitter: @zixun_

email: [email protected]

github: zixun

blog: 子循(SubCycle)

License

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