Latest 0.3.1
Homepage https://github.com/ainopara/CrashlyticsLogger
License MIT
Platforms ios 9.0
Dependencies Crashlytics, CocoaLumberjack, CocoaLumberjack/Swift
Authors

This is an extension for CocoaLumberjack to forward logs to Crashltyics.

Installation

CocoaPods

Thanks to CocoaPods 1.4.0 add support to static_framework, This library can be imported from CocoaPods.

pod 'CrashlyticsLogger', '~> 0.3.1'

Manual

Add this repo as git submodule. Then manually add sources to your project.

Note that CrashlyticsLogger require Crashlytics and CocoaLumberjack as dependency.

Usage

Setup Loggers

let formatter = DDMultiFormatter()
formatter.add(DispatchQueueLogFormatter())
formatter.add(ErrorLevelLogFormatter())
formatter.add(DateLogFormatter())

let crashlyticsLogger = CrashlyticsLogger.shared
crashlyticsLogger.logFormatter = formatter
DDLog.add(crashlyticsLogger)

let inMemoryLogger = InMemoryLogger.shared
inMemoryLogger.logFormatter = formatter
DDLog.add(inMemoryLogger)

License

MIT

Latest podspec

{
    "name": "CrashlyticsLogger",
    "version": "0.3.1",
    "summary": "A custom CocoaLumberjack logger to forward logs to Crashlytics.",
    "description": "A custom CocoaLumberjack logger to forward logs to Crashlytics.nThis is a swift repo and has dependency of static lib in Crashlytics SDK.",
    "homepage": "https://github.com/ainopara/CrashlyticsLogger",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "ainopara": "[email protected]"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source": {
        "git": "https://github.com/ainopara/CrashlyticsLogger.git",
        "tag": "0.3.1"
    },
    "source_files": "Sources/*.{swift}",
    "static_framework": true,
    "swift_version": "4.0",
    "pod_target_xcconfig": {
        "OTHER_SWIFT_FLAGS": "-F ${PODS_ROOT}/Crashlytics/iOS"
    },
    "dependencies": {
        "Crashlytics": [],
        "CocoaLumberjack": [],
        "CocoaLumberjack/Swift": []
    }
}

Pin It on Pinterest

Share This