Coder Social home page Coder Social logo

troupe's Introduction

Troupe

About Troupe

What is Troupe?

Troupe is a Kotlin Multi-Platform (KMP) port of Timber, renamed as a homage to Bards from D&D ๐Ÿ‰ ๐ŸŽฒ.

Why create Troupe?

I wanted centralized and uniform logging across all of my other KMP libraries as well as my native mobile, web, and desktop applications.

Why port Timber?

As a user and advocate of Timber it seemed natural to use it as inspiration. Luckily for me it was already written in Kotlin so the core source of the library is the same. Minor tweaks were made to remove Android/JVM specific APIs so that it could be written in commonMain.

What's with the name?

It's a mix of honoring Timber's pun-y naming and my love for D&D. Bards (Trees) are usually responsible for reciting stories like their adventuring counterparts. Since a Bard rarely travels alone and works best with a network of other Bards the library name was chosen to represent "a group of dancers, actors, or other entertainers who tour to different venues.", or Troupe1

Usage

Installation

Maven projects (KMP/JVM/Android)

depedencies {
    // For KMP projects
    implementation("com.saintpatrck.logging:troupe:$version")
    
    // Android only artifacts
    implementation("com.saintpatrck.logging:troupe-android:$version")
    
    // JVM only artifacts
    implementation("com.saintpatrck.logging:troupe-jvm:$version")
}

Subscribe to logs

Subscribe to logs by implementing Bard and recruiting it to the Troupe

KMP/JVM/Android

class MyBard : Bard() {
    override fun sing(priority: Int, tag: String?, message: String, throwable: Throwable?) {
        // Handle log as desired.
    }
}

MacOS/iOS

TBD

Generate logs

KMP/JVM/Android

// Generate DEBUG log
Troupe.d()

// Generate VERBOSE log
Troupe.v()

// Generate INFO log
Troupe.i()

// Generate WARN log
Troupe.w()

// Generate ERROR log
Troupe.e()

// Generate WTF log
Troupe.wtf()

XCode projects(MacOS/iOS)

TBD

Footnotes

  1. Oxford Languages โ†ฉ

troupe's People

Contributors

saintpatrck avatar

Stargazers

Kevin S. 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.