Skip to content

Latest commit

 

History

History
61 lines (45 loc) · 1.99 KB

README.md

File metadata and controls

61 lines (45 loc) · 1.99 KB

FFLumberjack

CI Status Version License Platform

中文介绍点这里

Introduction

FFLumberjack is based on CocoaLumberjack, and encapsulated it:

  1. The default initialization settings are automatically set and you can use it directly without any settings;
  2. Unified setting of log format: "Date file line-count: Content": "2024.06.30-17:06:52:151 ViewController 21: Are You OK?";
  3. The log file name has been uniformly set as "CFBundleName-Time.log": "Example-2024.06.30-15.50.30.log". And it can be imported only once for global use without polluting the namespace.

Installation

1. CocoaPods

FFLumberjack can be installed through CocoaPods. In Podfile, just add the following lines:

pod 'FFLumberjack'

Then execute in the terminal:

pod install

2. Swift Package Manager

FFLumberjack can be installed through Swift Package Manager. URL:

https://github.com/findingfield/FFLumberjack.git

Usage

FFLumberjack is very easy to use, first import the library and then give an alias:

import FFLumberjack

typealias MyLog = FFLumberjack

Then you can use MyLog anywhere in your project:

MyLog.verbose("verbose")
MyLog.debug("debug")
MyLog.info("info")
MyLog.warn("warn")
MyLog.error("error")

Author

findingfield, findingfield@qq.com

License

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