A tool library for displaying logcat in applications
Edit your build.gradle file and add below dependency:
dependencies {
implementation 'com.itlgl.android:logcatview:(latestVersion)'
}Default:
<com.itlgl.android.logcatview.LogcatView
android:layout_width="match_parent"
android:layout_height="match_parent"/>Filter specified tags:
<com.itlgl.android.logcatview.LogcatView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:filterTags="L System.out"/>Custom logcat cmd,add -v time to ensure that the log color will not be confused:
<com.itlgl.android.logcatview.LogcatView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:customCmd="logcat System.out:V *:S -v time"/>