SysdataSpA / Blabber

iOS modular logger based on CocoaLumberjack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Blabber

Version License Platform

Example

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

Requirements

iOS 8 and above

Installation

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

pod "Blabber"

If you want to manage your logs with CocoaLumberjack use subpod

pod "Blabber/CocoaLumberjack"

License

Blabber is available under the Apache license. See the LICENSE file for more info.

Introduction

Blabber is a library that provides a common wrapper to our each library (ex. Docker, Umarell, ...) to log messages with different filter levels. By default it writes all messages (depending about filter level set) with NSLog. You can also use SDLoggerDelegate protocol, set as logger delegate and manage your messages implementing method logger:didReceiveLogWithLevel:syncMode:module:file:function:line:format:arguments:

Otherwise if you want to use CocoaLumberjack to log your messages you can use the subpod Blabber/CocoaLumberjack.

Define your log module

If you want to define a specific log module (ex. in your private pod), you can use SDLoggerModuleProtocol

- (NSString*) loggerModuleName
{
    return "your module name";
}

- (SDLogLevel) loggerModuleLogLevel
{
    return [[SDLogger sharedLogger] logLevelForModuleWithName:self.loggerModuleName];
}

- (void) setLoggerModuleLogLevel:(SDLogLevel)level
{
    [[SDLogger sharedLogger] setLogLevel:level forModuleWithName:self.loggerModuleName];
}

About

iOS modular logger based on CocoaLumberjack

License:Apache License 2.0


Languages

Language:Objective-C 88.3%Language:Swift 6.7%Language:Ruby 5.1%