GithubHelp home page GithubHelp logo

baselogger's Introduction

BaseLogger

Android中BaseLog工具

Gradle远程依赖

1:在项目根目录build.gradley

allprojects {
  repositories {
    //依赖仓库
   maven { url 'https://jitpack.io' }
  }
}

2:依赖BaseLog工具

compile 'com.github.liqinew:baselogger:V.1.0.0'

代码使用方法

/**
* 设置调试Log是否显示和显示级别
*<p>
*建议放到Application中去设置。
*<p>
*如果没有设置,默认是全部显示。
*</p>
* @param loggerState Log级别
*/
Logger.setDebugLog(LoggerState loggerState);
/**
*Log.i级别展示
*@param tag log展示的log
*@param content log打印的内容
*/
Logger.i(String tag, String content);
/**
*Log.v级别展示
*@param tag log展示的log
*@param content log打印的内容
*/
Logger.v(String tag, String content);
/**
*Log.d级别展示
*@param tag log展示的log
*@param content log打印的内容
*/
Logger.d(String tag, String content);
/**
*Log.e级别展示
*@param tag log展示的log
*@param content log打印的内容
*/
Logger.e(String tag, String content);
/**
*Log.w级别展示
*@param tag log展示的log
*@param content log打印的内容
*/
Logger.w(String tag, String content);

Log显示状态LoggerState对象对应的状态码

/**
* 全部显示
*/
LEVEL_ALL_SHOW(0),
/**
* 除了I级别的全部都显示,
*/
LEVEL_I_SHOW(1),
/**
* 除了I级,V级别的全部都显示
*/
LEVEL_V_SHOW(2),
/**
* 除了I级,V级,D级别的全部都显示,
*/
LEVEL_D_SHOW(3),
/**
* 除了IVDE级别的全部都显示
*/
LEVEL_E_SHOW(4),
/**
* 关闭log显示
*/
LEVEL_NO_SHOW(5);

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.