Latest 1.0.0
Homepage https://github.com/ModuluxStudio/swiftyremotelogger
License MIT
Platforms ios 9.0
Authors

swiftyremotelogger

A simple remote logger to get logs from

Features

  • Get remote logs from all devices
  • Get them directly in your own server
  • You only need one line of code to configure it

Table of Contents

[TOC]

Installation

Cocoapods

Add this to your Podfile:

pod SwiftyRemoteLogger

and run this in your terminal

pod install

Usage

In the AppDelegate import it with:

import SwiftyRemoteLogger

And configure it with

RemoteLogger(baseUrl: "your server url", logs: [.verbose, .informative, .warnings, .error], device: UIDevice.current, screen: UIScreen.main)

And thats it, now you only need to call the module functions in order to trigger the logs. For example:

RemoteLogger.shared.log(type: .informative, message: "An informative log")
RemoteLogger.shared.log(type: .verbose, message: "A verbose log")
RemoteLogger.shared.log(type: .warnings, message: "A warning log")
RemoteLogger.shared.log(type: .error, message: "An error log")

Extension

In order to have a single file with all the functions, my recomendation is to have them in a LogExtension.swift file with the following:

import Foundation
import SwiftyRemoteLogger

func inform(_ message: String) {
    RemoteLogger.shared.log(type: .informative, message: message)
}

func verbose(_ message: String) {
    RemoteLogger.shared.log(type: .verbose, message: message)
}

func warn(_ message: String) {
    RemoteLogger.shared.log(type: .warnings, message: message)
}

func error(_ message: String) {
    RemoteLogger.shared.log(type: .error, message: message)
}

Latest podspec

{
    "name": "SwiftyRemoteLogger",
    "version": "1.0.0",
    "summary": "SwiftyRemoteLogger to store remote logs from different devices",
    "description": "SwiftyRemoteLogger to store remote logs from different devices description",
    "homepage": "https://github.com/ModuluxStudio/swiftyremotelogger",
    "swift_version": "3.2",
    "license": "MIT",
    "authors": {
        "Jonathan Silva": "[email protected]"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source": {
        "git": "https://github.com/ModuluxStudio/swiftyremotelogger.git",
        "tag": "1.0.0"
    },
    "source_files": [
        "Classes",
        "swiftyremotelogger/**/*.{swift,h,m}"
    ],
    "exclude_files": "Classes/Exclude"
}

Pin It on Pinterest

Share This