All Projects → wangjintao → TLog

wangjintao / TLog

Licence: other
Android日志工具

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to TLog

Xlog
Android logger, pretty, powerful and flexible, log to everywhere, save to file, all you want is here.
Stars: ✭ 2,468 (+15325%)
Mutual labels:  log, file, logcat
aushape
A library and a tool for converting audit logs to XML and JSON
Stars: ✭ 37 (+131.25%)
Mutual labels:  log, file
sprout
Golang logging library supporting log retrieval.
Stars: ✭ 85 (+431.25%)
Mutual labels:  log, file
Naza
🍀 Go basic library. || Go语言基础库
Stars: ✭ 253 (+1481.25%)
Mutual labels:  log, file
log-target-file
Yii Logging Library - File Target
Stars: ✭ 19 (+18.75%)
Mutual labels:  log, file
aixlog
Header-only C++ logging library
Stars: ✭ 95 (+493.75%)
Mutual labels:  log, logcat
gologger
A concurrent, fast queue/service worker based filesystem logging system perfect for servers with concurrent connections
Stars: ✭ 16 (+0%)
Mutual labels:  log, file
Logger
✔️ Simple, pretty and powerful logger for android
Stars: ✭ 13,093 (+81731.25%)
Mutual labels:  log, logcat
Go Logger
一个简单而强大的 golang 日志工具包,支持同步和异步输出到 命令行,文件, api 接口,文件支持按文件大小,文件行数,日期切分;A simple and powerful golang logging toolkit that supports synchronous and asynchronous output to the console, file, API interfaces, file support by file size, file line number, date sharding.
Stars: ✭ 152 (+850%)
Mutual labels:  log, file
Android Filelogger
A general-purpose logging library with built-in support to save logs to file efficiently.
Stars: ✭ 70 (+337.5%)
Mutual labels:  log, file
Androidutilcode
AndroidUtilCode 🔥 is a powerful & easy to use library for Android. This library encapsulates the functions that commonly used in Android development which have complete demo and unit test. By using it's encapsulated APIs, you can greatly improve the development efficiency. The program mainly consists of two modules which is utilcode, which is commonly used in development, and subutil which is rarely used in development, but the utils can be beneficial to simplify the main module. 🔥
Stars: ✭ 30,239 (+188893.75%)
Mutual labels:  log, file
datalogger
DataLogger foi projetado para ser uma biblioteca simples de log com suporte a vários providers.
Stars: ✭ 46 (+187.5%)
Mutual labels:  log, logcat
LogDelegate
Simple, pretty and powerful logger for android
Stars: ✭ 287 (+1693.75%)
Mutual labels:  log, logcat
ts3admin.class
The ts3admin.class is a powerful api for communication with Teamspeak 3 Servers from your website! Your creativity knows no bounds!
Stars: ✭ 107 (+568.75%)
Mutual labels:  file
colocat
Fegeya Colocat, Colorized 'cat' implementation. Written in C++17.
Stars: ✭ 14 (-12.5%)
Mutual labels:  file
LogDNA-Android-Client
Android client for LogDNA
Stars: ✭ 22 (+37.5%)
Mutual labels:  log
Cakebase
Cakebase is an asynchronous json database for nodejs.
Stars: ✭ 28 (+75%)
Mutual labels:  file
mindav
A self-hosted file backup server which bridges WebDAV protocol with @minio written in @totoval. Webdav ❤️ Minio
Stars: ✭ 64 (+300%)
Mutual labels:  file
LogESP
Open Source SIEM (Security Information and Event Management system).
Stars: ✭ 162 (+912.5%)
Mutual labels:  log
pyqso
PyQSO is a contact logging tool for amateur radio operators.
Stars: ✭ 75 (+368.75%)
Mutual labels:  log

TLog

Android日志工具,支持Logcat输出和文件记录(可自定义大小,默认0.1M),两种显示方式都可以配置是否需要显示。

功能介绍

  • 控制台日志显示,支持配置TAG过滤
  • 保存内容到文件中

版本说明

  • v1.0.0 项目初始提交
  • v1.0.1 增加gradle引用
  • v1.0.2 支持logcat长日志打印

使用介绍

  1. 在根build.gradle中添加:

    allprojects {
    	repositories {
    		...
    		maven { url 'https://jitpack.io' }
        }
    }
    
  2. 项目的build.gradle中添加:

    dependencies {
        implementation 'com.github.wangjintao:TLog:v1.0.2'
    }
    
    
  3. 如果你的项目中没有更改Application,在AndroidManifest.xml中配置如下:

    <manifest>
        <application
            android:name="com.tao.admin.loglib.TLogApplication"
            ...
        </application>
    </manifest>
    

    如果你在项目中有自己的Application文件,如:

    <manifest>
       
           <application
               android:name=".MyApplication"
               ...
           </application>
       
    </manifest>
    

    没关系,你可以让自己的Application继承TLogApplication:

    public class MyApplication extends TLogApplication {
        @Override
        public void onCreate() {
            super.onCreate();
            ...
        }
    }
    

    或者你已经继承了其他Application,你可以在onCreate()中调用TLogApplication.initialize(this);

    public class MyApplication extends Application {
        @Override
        public void onCreate() {
            super.onCreate();
            TLogApplication.initialize(this);
            ...
        }
    }
    
  4. 配置是否需要在logcat或文件中记录日志:

    public class MyApplication extends Application {
        @Override
        public void onCreate() {
            super.onCreate();
            TLogApplication.initialize(this);
            IConfig.getInstance().isShowLog(true)//是否在logcat中打印log,默认不打印
                    .isWriteLog(true)//是否在文件中记录,默认不记录
                    .fileSize(100000)//日志文件的大小,默认0.1M,以bytes为单位
                    .tag("myTag");//logcat 日志过滤tag
        }
    }
    
  5. 打印/记录日志

    • 带标题
      Logger.i(title, log);
      Logger.w(title, log);
      Logger.e(title, log);
      
      带标题
    • 无标题
      Logger.i(log);
      Logger.w(log);
      Logger.e(log);
      
      无标题
  6. 查看本地日志

    String log = FileUtils.readLogText();
    mTextView.setText(log);
    

    本地日志

关于作者

作者:王金涛
邮箱:[email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].