Skip to content

ScreenLogger --- show your log above your app. 简单集成的屏幕Log

Notifications You must be signed in to change notification settings

BestDI/ScreenLogger

Repository files navigation

ScreenLogger -- 一个简单可用的屏幕日志插件

How to Use it?

  1. Add it in your root build.gradle at the end of repositories:
allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

Add the dependency

dependencies {
    implementation 'com.github.BestDI:ScreenLogger:v1.0'
}
  1. init in your application:
override fun onCreate() {
    super.onCreate()

    ProcessLifecycleOwner.get().lifecycle.apply {
        val isEnable = true // 可以通过isEnable的状态控制是否打开ScreenLog
        addObserver(LoggerLifecycleObserver(this@MainApplication, isEnable))
    }
}

now, you could use it:

Logger.warn("TAG", "hello from button")

or you could use: typealias ScreenLogger = Logger

use result

1.request permission(above android 6.0)

2.tracking log

3.log details

About

ScreenLogger --- show your log above your app. 简单集成的屏幕Log

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages