Latest 1.0.0
Homepage https://github.com/iadvize/swift-graylog
License MIT
Platforms ios 8.0
Authors

CircleCI

Graylog library written in Swift.

Documentation

First you have to define your Graylog server URL:

if let url = URL(string: "https://yourgraylog.com/gelf") {
    Graylog.setURL(url)
}

Then you can send log to Graylog using the log method by passing a dictionary which represents your JSON payload:

Graylog.log(["message": "Hello Graylog!"])

Here is a list of available fields in Graylog: Graylog Documentation

If an issue is thrown while sending a log, a message will be printed in the Xcode console. The framework stores logs locally in the user preferences and retry the failed one each 60 seconds.

Installation

Cocoapods

Add the dependency to your Podfile:

pod 'SwiftGraylog'

and use import SwiftGraylog where you want to use it.

Contribute

Look at contribution guidelines here: CONTRIBUTING.md

Once you’ve forked the repository you should pod install at the root of the repository and open the SwiftGraylog.xcworkspace workspace.

N.B. You have access to template files for Pull Requests and Issues opening:

Latest podspec

{
    "name": "SwiftGraylog",
    "version": "1.0.0",
    "license": "MIT",
    "homepage": "https://github.com/iadvize/swift-graylog",
    "authors": {
        "Name": "[email protected]"
    },
    "summary": "Graylog library written in Swift.",
    "source": {
        "git": "https://github.com/iadvize/swift-graylog.git",
        "branch": "master"
    },
    "platforms": {
        "ios": "8.0"
    },
    "swift_version": "4.2",
    "source_files": "Source/*.swift"
}

Pin It on Pinterest

Share This