Goal is to print android framework logs in logcat
Android 4.0 or higher
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Step 2. Add the dependency
dependencies {
implementation 'com.github.mammahe:Plog:2'
}
Step 3. Add import in activity
import com.example.logfilter.PLog;
Step 4. Example usage in activity
PLog.v("P Log V");
PLog.d("P Log D");
PLog.i("P Log I");
PLog.w("P Log W");
PLog.e("P Log E");
2020-03-24 10:29:30.360 10025-10025/com.example.myapplication V/com.example.myapplication.MainActivity: 2020-03-24 10:29:30.359 com.example.myapplication.MainActivity#onCreate:18 P Log V
2020-03-24 10:29:30.361 10025-10025/com.example.myapplication V/com.example.myapplication.MainActivity: 2020-03-24 10:29:30.360 com.example.myapplication.MainActivity#onCreate:19 P Log D
2020-03-24 10:29:30.362 10025-10025/com.example.myapplication V/com.example.myapplication.MainActivity: 2020-03-24 10:29:30.361 com.example.myapplication.MainActivity#onCreate:20 P Log I
2020-03-24 10:29:30.363 10025-10025/com.example.myapplication V/com.example.myapplication.MainActivity: 2020-03-24 10:29:30.362 com.example.myapplication.MainActivity#onCreate:21 P Log W
2020-03-24 10:29:30.364 10025-10025/com.example.myapplication V/com.example.myapplication.MainActivity: 2020-03-24 10:29:30.363 com.example.myapplication.MainActivity#onCreate:22 P Log E
Copyright 2019 Sairamkrishna Mammahe
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software under the License is distributed on an "AS IS" BASIS, WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. the License for the specific language governing permissions and under the License.