Giter Club home page Giter Club logo

clog's Introduction

Clog

API Codacy Badge

这是一个将android 崩溃日志写入到sd卡得工具类。
This is a tool that write the Android crash log to the sd card.
最低版本android2.2(8),已经适配到android7.0。

目前对应Clog版本1.0.2.

导入方法

  • Android Studio

在project的build.gradle里面添加

allprojects {
	repositories {
		...
		maven { url "https://jitpack.io" }
	}
}

在module的build.gradle里面添加

compile 'com.dreamlive.cn.clog:ClogLibrary:0.0.1'

或者

compile 'com.github.dreamlivemeng:Clog:1.0.2'

更多版本号请看这儿

使用方法1

强烈建议使用方法1,因为不需要权限。

在application的oncreate()进行初始化

  //android6.0也不需要动态sd权限,
  //将错误日志写入到sd卡,默认为Android/data/包名/files/logs下面放这个目录下主要是为了不需要权限
  CollectLog clog = CollectLog.getInstance();
  clog.init(this);

使用方法2

自定义日志存放路径 在application的oncreate()进行初始化

   //自定义日志存放路径,
   //这儿示例就只传了sd根目录下的dreamlivemeng(/storage/emulated/0/dreamlivemeng),把错误日志写到这个目录下
  CollectLog clog = CollectLog.getInstance();
  clog.init(this, Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + "dreamlivemeng");

混淆

#Clog
-dontwarn com.dreamlive.cn.**
-keep classcom.dreamlive.cn.**{*;}


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.