Milad-Akarie / pretty_dio_logger

MIT License
238 stars 53 forks source link

How to configure log not to display in release mode #34

Closed chengmenghuiAndroid closed 4 months ago

dhruvanbhalara commented 1 year ago

Hello @chengmenghuiAndroid ,

This should be done using kReleaseMode constant which values will be true in release mode as per the definition mentioned here.

if (!kReleaseMode) {
  dio.interceptors.add(
    LogInterceptor(
      requestBody: true,
      responseBody: true,
      responseHeader: false,
    ),
  );
}
Milad-Akarie commented 4 months ago

you can now use the enable prop enabled: kDebugMode