flutter_logger
simple, pretty and powerful logger for flutter,it has the log level, file name and line number, and can customize the color of the log level,it was inspired by logger
download
flutter_easylogger: ^{last_version}
usage
logger.d("hello");
output
options
no tag
logger.v("hello world");
logger.d("hello world");
logger.i("hello world");
logger.w("hello world");
logger.e("hello world");
var json = "{"name":"tom","age":"18"}";
logger.json(json);
with tag
logger.d("hello",tag:"tag");
json support (output will be in debug level)
logger.json(json);
advanced
logger.levelverbose = 247;
logger.leveldebug = 26;
logger.levelinfo = 28;
logger.levelwarn = 3;
logger.levelerror = 9;
you can change the color of level, and the value is in the range of 0-255. please refer to the picture below for details
note
turn off logging when production
logger.enable = false;
Comments are closed.