Skip to content

A logging framework based on CocoaLumberjack. Enable you to output logs without making any settings.

License

Notifications You must be signed in to change notification settings

findingfield/FFLumberjack

Repository files navigation

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, [email protected]

License

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

About

A logging framework based on CocoaLumberjack. Enable you to output logs without making any settings.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published