Latest 0.2
Homepage https://github.com/stephanecopin/LoggerWrapper
License MIT
Platforms ios 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

None.

Installation

LoggerWrapper aims to provide a simple wrapper around the various logging library that exists for iOS.

Ideally, this library allows library creators to allow to use logging, without relying on the classic NSLog/print which can’t be disabled easily.
If you’re a library creator, just reference LoggerWrapper as a dependency of it in your Podspec.
Users of your library may then implement their own logging on top of it (or use one of our subspecs to get it for free), or even just choose to leave it disabled.

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

pod 'LoggerWrapper/Swift'

The library requires your app to use use_frameworks!. If your library/app isn’t in Swift (or for an app, if you don’t (can’t?) want to use use_frameworks! in your Podfile), you can restrict to using only the Objective-C version:

pod 'LoggerWrapper/ObjC'

With CocoaLumberjack

To install, add the following line instead in your Podfile:

pod 'LoggerWrapper/CocoaLumberjack/Swift'

(You may also replace Swift for ObjC for the same reasons as above)

This subspec provides a subclass of STCLogger called STCCocoaLumberjackLogger, which sets up a default configuration for CocoaLumberjack.

With PluggableApplicationDelegate

This subspec provide an ApplicationService class called LoggingApplicationService that automatically set up a CocoaLumberjack File Logger to save the logs to the Device (and allow you to retrieve them), and set STCLogger.shared to an instance of STCCocoaLumberjackLogger

To install, add the following line instead in your Podfile:

pod 'LoggerWrapper/CocoaLumberjack/PluggableApplicationDelegate'

And add an instance of LoggingApplicationService() to the list of services you give to the PluggableApplicationDelegate.

Author

Stéphane Copin, [email protected]

License

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

Latest podspec

{
    "name": "LoggerWrapper",
    "version": "0.2",
    "summary": "A very simple library that aims to provide a simple wrapper around the various logging library that exists for iOS.",
    "description": "A very simple library that aims to provide a simple wrapper around the various logging library that exists for iOS.nCurrently supports CocoaLumberjack, and can optionally integrate with PluggableApplicationDelegate.nn  Ideally, this library allows library creators to allow to use logging, without relying on the classic NSLog/print whichn  can't be disabled easily.",
    "homepage": "https://github.com/stephanecopin/LoggerWrapper",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "stephanecopin": "[email protected]"
    },
    "source": {
        "git": "https://github.com/stephanecopin/LoggerWrapper.git",
        "tag": "0.2"
    },
    "social_media_url": "https://fueled.com/stephane",
    "platforms": {
        "ios": "9.0"
    },
    "default_subspecs": "ObjC",
    "pushed_with_swift_version": "3.0",
    "subspecs": [
        {
            "name": "ObjC",
            "source_files": "LoggerWrapper/Classes/*.{h,m}"
        },
        {
            "name": "Swift",
            "dependencies": {
                "LoggerWrapper/ObjC": []
            },
            "source_files": "LoggerWrapper/Classes/*.{swift}"
        },
        {
            "name": "CocoaLumberjack",
            "subspecs": [
                {
                    "name": "Core",
                    "dependencies": {
                        "LoggerWrapper/ObjC": [],
                        "CocoaLumberjack": []
                    },
                    "source_files": "LoggerWrapper/Classes/CocoaLumberjack/*.{h,m,swift}"
                },
                {
                    "name": "Swift",
                    "dependencies": {
                        "LoggerWrapper/Swift": [],
                        "CocoaLumberjack/Swift": []
                    },
                    "source_files": "LoggerWrapper/Classes/CocoaLumberjack/*.{h,m,swift}"
                },
                {
                    "name": "PluggableApplicationDelegate",
                    "dependencies": {
                        "LoggerWrapper/CocoaLumberjack/Swift": [],
                        "PluggableApplicationDelegate": []
                    },
                    "source_files": "LoggerWrapper/Classes/CocoaLumberjack/PluggableApplicationDelegate/**/*"
                }
            ]
        }
    ]
}

Pin It on Pinterest

Share This