Git Product home page Git Product logo

logger's Introduction

Logger

An unified logging system for iOS and macOS with internal caching system as well as server replication support.

Features

  • Log on to a log server.
  • Log on to a local cache.
  • Schedule sending logs.
  • Distinguish between types of logs such as(Request, Response, Internal).

Installation

Swift Package Manager(SPM)

Add in Package.swift or directly in Xcode Project dependencies section:

.package(url: "https://github.com/hamed8080/logger.git", .upToNextMinor(from: "1.2.1")),

Add in Podfile:

pod 'Logger', :git => 'http://pubgi.sandpod.ir/chat/ios/logger.git', :tag => '1.2.1'

How to setup?

let config = LoggerConfig(
 prefix: "YOUR_PREFIX",
 logServerURL: "YOUR_SERVER_ADDRESS",
 logServerMethod: "PUT",
 persistLogsOnServer: true,
 isDebuggingLogEnabled: true
)
let logger = Logger(config: config)
logger.delegate = delegate

How to use?

logger.log(title: "YOUR_TITLE", message: "YOUR_MESSAGE", persist: true, type: .internalLog)
logger.logJSON(title: "YOUR_TITLE", jsonString: "[{"name": "hamed"}]", persist: false, type: .received)

Clear Core data internal cache.

Logger.clear(prefix: "YOUR_PREFIX")

For more information about how to use Logger visit Documentation

Contributing to Logger

Please see the contributing guide for more information.

logger's People

Contributors

hamed8080 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.