GithubHelp home page GithubHelp logo

rmkrishna / mlog-kotlin Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 170 KB

Simple Logging library for Android in Kotlin, It will help you to print the logs in Console and also it will store the logs in File in your mobile storage.

License: Apache License 2.0

Kotlin 90.48% Java 9.52%
kotlin mlog-kotlin android logger log logging kotlin-library

mlog-kotlin's Introduction

MLog-Kotlin

Simple Logging library for Android in Kotlin, It will help you to print the logs in Console and also it will store the logs in File in your mobile storage.

Download Apache License V.2

Usage

Dependency

compile 'in.rmkrishna:mlog:0.0.3'

Initialization

MLog.init(this, true, true)

How to use

        // If tag is not provided, we will generate Tag based on your Activity and method name
        MLog.d("Calculate") // log a String without tag, 
        
        MLog.d(TAG, "onCreate") // log a String with tag

        var jsonObject: JSONObject = JSONObject().apply {
            put("name", "Muthukrishnan Rajendran")
            put("device", "Android")
        }

        MLog.d(jsonObject) // To log a Json object

        var jsonArray: JSONArray = JSONArray().apply {
            put("Message 1")
            put("Message 2")
            put("Message 3")
            put("Message 4")
            put("Message 5")
        }
        MLog.d(jsonArray) // To log a Json array

License

                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

Copyright 2017 Muthukrishnan R

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

mlog-kotlin's People

Contributors

rmkrishna avatar

Stargazers

Sakthivel G avatar Randhir Kumar Gupta avatar Vinayagasundar avatar

Watchers

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