Skip to main content

Installation

Just like most library load with Gradle, add line at dependencies block will do

For non-Android project,

build.gradle
dependencies {
// ...
implementation 'io.hkhc.log:ihlog:0.6.1'
// ...
}

We have a dedicated variation for Android proejct:

build.gradle
dependencies {
// ...
implementation 'io.hkhc.log:ihlog-android:0.6.1'
// ...
}

The library is available at both Maven Central, so chances are that you don't need to change the repository settings in Gradle script.

Setup for Android app#

IHLog can target to different log implementations. It send log to standard output out of the box. To target Android Log class, add the following line to the Application class of the project

class MyApplication: Application() {
override fun onCreate() {
super.onCreate()
IHLogConfig.init(createAndroidSetting(this))
}
}