Skip to content

Nghi-NV/logger-console

Repository files navigation

Console log package

Usage

  • Download ServerLog application for mac os, window and linux

In the main.dart set logEnable = true for release mode

Console.logEnable = true;
```s

With android device, you need connect to ip of ServerLog app desktop server
```dart
Console.host = "Server Log IP";

Custom host

Console.uri = "your-custom-host";
import 'package:logger_console/logger_console.dart';
  
onShowLog() {
  Console.log("string or object...");

  Console.log([
    {"color": "red", "value": "#f00"},
    {"color": "green", "value": "#0f0"},
    {"color": "blue", "value": "#00f"},
    {"color": "cyan", "value": "#0ff"},
    {"color": "magenta", "value": "#f0f"},
    {"color": "yellow", "value": "#ff0"},
    {"color": "black", "value": "#000"},
  ]);

  Console.group('group data');
  Console.log("data", [
    {"color": "red", "value": "#f00"},
    {"color": "green", "value": "#0f0"},
    {"color": "blue", "value": "#00f"},
    {"color": "cyan", "value": "#0ff"},
    {"color": "magenta", "value": "#f0f"},
    {"color": "yellow", "value": "#ff0"},
    {"color": "black", "value": "#000"},
  ]);
  Console.groupEnd();
}

Credits