fluttter_socket_log_plugin 1.1.3 copy "fluttter_socket_log_plugin: ^1.1.3" to clipboard
fluttter_socket_log_plugin: ^1.1.3 copied to clipboard

A Flutter package which provides remote socket logging to see debug prints outside the app. This is especially useful for QA testers.

PRs Welcome pub package

flutter_socket_log_plugin #

Logging flutter apps to remote using socket. In order to connect to remote app, you need to be in the same local network. The tester will be able to see all the logs inside the client app.

You can find the client app source code here.

Client application to watch logs #

Horizontal

Installation #

Add

flutter_socket_log_plugin : # latest version

or run

flutter pub add flutter_socket_log_plugin

How to Use #

Install Client Application

Install client app using the flutter source code for windows, linux, mac, android, ios or install app for windows and android.

Basic Usage
Initialize the plugin in main function
void main() {
  	// add conditions to initialize the plugin
  	FlutterSocketLogPlugin.init(appName: 'Dummy App');
  	runApp(const MyApp());
}
Log to remote client app
FlutterSocketLogPlugin.log(
   'Write your logs', 
   DefaultLogs.debug, // customize logs if you want
   [DefaultLogs.network], // add your log tags, customize tags
);
Customize Log Levels and Log Tags
Initialize your log tag and log level
List<LogLevel> logLevels = [
  FlutterSocketLogPlugin.createLogLevel(
    'Critical',
    Colors.cyan.value,
    Icons.warning.codePoint,
  ),
  FlutterSocketLogPlugin.createLogLevel(
    'Alert',
    Colors.red.value,
    Icons.error.codePoint,
  )
];

List<LogTag> logTags = [
  FlutterSocketLogPlugin.createTag(
    'Request',
    Colors.blue.value,
    Icons.network_wifi.codePoint,
  ),
  FlutterSocketLogPlugin.createTag(
    'Response',
    Colors.green.value,
    Icons.network_wifi.codePoint,
  ),
];
Add customizations to init function
FlutterSocketLogPlugin.init(
  appName: 'Customized App',
  logLevels: logLevels,
  logTags: logTags,
);
Start Logging
FlutterSocketLogPlugin.log(
  'Write your logs here',
  logLevels[0],
  [
    logTags[0],
    logTags[1],
  ]
);
Once you define your custom methods it could be as simple as this:
Logger.debugNetwork('Write your log here');

Log Tags and Log Levels

Log Tags and Log Levels are customizable which means that you can create your own by custom names, colors as well as icons. As a result you can get those in the client application.

11
likes
100
pub points
0%
popularity

Publisher

unverified uploader

A Flutter package which provides remote socket logging to see debug prints outside the app. This is especially useful for QA testers.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, json_annotation, json_serializable, network_info_plus, rxdart

More

Packages that depend on fluttter_socket_log_plugin