qa_logger 0.4.2 copy "qa_logger: ^0.4.2" to clipboard
qa_logger: ^0.4.2 copied to clipboard

qa_logger is a Dart package that provides a simple and efficient way to monitor network calls and logs in your application. It's a good tool for QA and backend developers.

example/qa_logger_example.dart

import 'package:dio/dio.dart';
import 'package:qa_logger/qa_logger.dart';

Future<void> main() async {
  /// (Optional) To configure the QaLogger with the specified ports and log limit

  // QaLogger.configure(port: 3001, wsPort: 8001, logLimit: 400);

  /// your Dio instance
  Dio dio = Dio();

  /// add the QaLogger DioInterceptor to the Dio instance
  dio.interceptors.add(QaLogger().dioInterceptor);


  /// call a dummy API using Dio
  dio.get('https://pub.dev');
  dio.get('https://jsonplaceholder.typicode.com/todos/1');

  QaLogger().log('This is a log message');
  QaLogger().logError('This is an error message');

  print("open the browser and go to http://localhost:3000 to see the network calls and logs");

  for (int i=2;i<10;i++) {
    await Future.delayed(Duration(seconds:1));
    dio.get('https://jsonplaceholder.typicode.com/todos/$i');
  }


  // now opent the browser and go to http://localhost:3000 to see the network  calls and logs
}
5
likes
0
points
50
downloads

Publisher

unverified uploader

Weekly Downloads

qa_logger is a Dart package that provides a simple and efficient way to monitor network calls and logs in your application. It's a good tool for QA and backend developers.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

dio, flutter_express, shelf, shelf_web_socket

More

Packages that depend on qa_logger