logPrint property

void Function(Object object) logPrint
getter/setter pair

Log printer; defaults print log to console. In flutter, you'd better use debugPrint. you can also write log in a file, for example:

 final file=File("./log.txt");
 final sink=file.openWrite();
 dio.interceptors.add(LogInterceptor(logPrint: sink.writeln));
 ...
 await sink.close();

Implementation

void Function(Object object) logPrint;