Latest 0.1.0
Homepage https://github.com/massdonati/tambo
License MIT
Platforms ios 11.0, watchos 3.0, tvos 10.0, osx 10.12
Authors

Tambo banner image

supported platforms programming language cocoapod cocoapod

Tambo is a versatile logging framework currently in development.

Installation

Cocoapods

pod 'Tambo'

Usage

Basic

To start using Tambo right away all you need to do is:

  1. import Tambo: this is usually done in your AppDelegate.
  2. create a global constant with the default Tambo singleton like so let log = Tambo.default.
  3. start calling the logging api to se the logs in the Xcode console.

Full power

In order to use Tambo the way it’s ment to be used, you need to create an instance with an identifier (helpfull to track the logging source in complex application that could have multiple Tambo instances).

let log = Tambo(identifier: "com.my.logger")

Then you need to create a strem object which, in Tambo language, defines where you want the logs to be displayed/sent to. In this example let’s create an Xcode console stream using the TConsoleStream class:

let console = TConsoleStream(identifier: "com.my.console", printMode: .print)

Once we have created a stream we can configure it as much as we want and after that we’re ready to add it to the Tambo instance in order for it to start logging.

log.add(stream: console)

Now we’re ready to show some logs to the console. YAY!! 🎉🎉🎉🎉

Log levels

In priority order:

  1. error
  2. warning
  3. info
  4. debug
  5. verbose

Logging Apis

Every log level has a correspondent method in the Tambo class.
When you call that api you can pass anything as a first parameter and optionally a context.

log.info("Request succeeded")
log.info(["one", "two", 3])
log.info(UIViewController(), context: ["url": request.url])

Stream Apis

Roadmap

  1. CI integration
  2. Proven carthage support
  3. Linux testing

Desclimer

This framework is still in development you’re welcome to

  1. try it out
  2. contribute
  3. submit issues/feature request

Latest podspec

{
    "name": "Tambo",
    "version": "0.1.0",
    "summary": "Logging framework for linux and Apple platforms.",
    "description": ""Logging framework for linux and Apple platforms."",
    "homepage": "https://github.com/massdonati/tambo",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Massimo Donati": "[email protected]"
    },
    "platforms": {
        "ios": "11.0",
        "watchos": "3.0",
        "tvos": "10.0",
        "osx": "10.12"
    },
    "source": {
        "git": "https://github.com/massdonati/tambo.git",
        "tag": "0.1.0"
    },
    "source_files": [
        "Tambo/***/**/*.swift",
        "Tambo/*.swift"
    ],
    "swift_version": "4.1"
}

Pin It on Pinterest

Share This