Skip to content

The log display plugin for the Dio network request library

License

Notifications You must be signed in to change notification settings

jawa0919/dio_log_plus

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dio_log_plus

pub package

Language: English README | 中文简体 README

HTTP Inspector tool for Dart which can debugging http requests,Currently, DIO based HTTP capture is implemented

Of course, you can implement an Interceptor instead of a DiologInterceptor to adapt to other HTTP clients

Screenshot

a b c d

Add dependency

dependencies:
  dio_log_plus: ^4

set interceptor of dio

dio.interceptors.add(DioLogInterceptor());

Add a global hover button on your home page to jump through the log list

///display overlay button
showDebugBtn(context, btnColor: Colors.blue);
///cancel overlay button
dismissDebugBtn();
///overlay button state of display
debugBtnIsShow()

Or open a log list where you want it to be

    Navigator.of(context).push(
      MaterialPageRoute(
        builder: (context) => HttpLogListWidget(),
      ),
    );

Other configurable parameters

/// Sets the maximum number of entries for logging
LogPoolManager.getInstance().maxCount = 100;
///Add the isError method implementation to LogPoolManager so that request messages defined as errors are displayed in red font
LogPoolManager.getInstance().isError = (res) => res.resOptions==null;
///Disabling Log Printing
DioLogInterceptor.enablePrintLog = false;

Thanks

dio_log

About

The log display plugin for the Dio network request library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dart 44.3%
  • C++ 26.7%
  • CMake 23.2%
  • HTML 2.3%
  • C 1.8%
  • Swift 1.5%
  • Other 0.2%