Easier and better way to create log message in android.
- Tag is optional.
- It automatically add the position of log to your log message so you can find out where it happend.
- Same syntax of android.util.Log and compatible with it.
- You can add some lable in front of your log message.
- You can fully disable logging with just setting a property.
First add this to your gradle
compile 'com.kia:betterlog:1.0.1'
then import it to each class you want
import com.kia.betterlog.Log;
public class MyClass {
}
You can set optional TAG
Log.setTag("MYTAG");
Log.w("I am warning message.");
Log.d("I am debug message.");
Log.e("I am error message.");
Log.i("I am info message.");
sample output
W/MYTAG: [com.kia.betterlogapp.MainActivity.writeDummyLog]I am warning message.
The first bracket show where the log message happend.
Log.d("I am a label", "I am debug message");
sample output
d/MYTAG: [com.kia.betterlogapp.MainActivity.writeDummyLog][I am a label]I am debug message
Log.e(Arrays.asList("label1", "label2"), "I am debug message");
sample output
e/MYTAG: [com.kia.betterlogapp.MainActivity.writeDummyLog][label1][label2]I am error message.
Log.setEnable(false);