Giter VIP home page Giter VIP logo

riddle's Introduction

Riddle

Riddle Logger:

Download

Riddle Network Interceptor:

Download

What does it do?

Riddle is a library you can import in your project to send your logs to the Riddle app. The Riddle app will be available soon. An overlay will be shown in Android where you can view all the logs by your app. You can also filter on certain parameters.

How To Use

Import in root gradle

allprojects {
    repositories {
        ...
        maven { url "https://dl.bintray.com/vanlooverenkoen/maven" }
        ...
    }
}

Apply the plugin by adding next command at the top of your app/build.gradle file

dependencies {
    implementation "be.vanlooverenkoen:riddle:0.0.5"
    implementation "be.vanlooverenkoen:riddle-network-interceptor:0.0.2"
}

Setup Logger

in your application file add the following. By default are all logTypes enabled. (Debug, Info, Verbose, Warn, Error, Assert). Make sure you only enable Riddle for debug builds.

    if (BuildConfig.DEBUG) {
        Riddle.with(this)
    }

Configuration Logger

If you want to enable or disable certain log types you need to pass only the logtypes you want to enable. The configuration below will enable logging for Debug, Error and Verbose. (Info, Warn and Assert will be disabled)

    if (BuildConfig.DEBUG) {
        Riddle.with(this)
              .setLogTypes(RiddleLogType.DEBUG,
                           RiddleLogType.ERROR,
                           RiddleLogType.VERBOSE)
    }

Usage Logger

Just call the methods on Riddle:

    Riddle.d("Tag", "Debug Content")       
    Riddle.i("Tag", "Info Content")       
    Riddle.v("Tag", "Verbose Content")       
    Riddle.w("Tag", "Warn Content")       
    Riddle.a("Tag", "Assert Content")     
    Riddle.e("Tag", "Error Content")

Setup Network Interceptor

in your application file add the following. Make sure you only enable Riddle for debug builds.

    if (BuildConfig.DEBUG) {
        OkHttpClient.Builder()
            .addInterceptor(RiddleNetworkInterceptor(context, baseUrl))
            .build()
    }       

riddle's People

Contributors

horstenwillem avatar vanlooverenkoen avatar

Stargazers

 avatar  avatar  avatar  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.