Skip to content

oloshe/visual_console

Repository files navigation

Visual Console

A visual console inspired by VConsole.

Features

  • configurable: It's a Logger Plugin.
  • simple: two channel output, IDE's console and screen visual-console.
  • tiny: It has a small size.
  • fast: It works fast and smooth.
  • powerful: Filter、Search, StackTrace, Clean, Copy, Delete some log by double-click and etc.

Getting started

1. Define Logger

final logger = VisualLogger(
  filter: ProductionFilter(),
  output: VisualOutput(),
  printer: VisualPrinter(
    realPrinter: VisualPrefixPrinter(
      methodCount: 1,
      lineLength: () {
        int lineLength = 80;
        try {
          lineLength = stdout.terminalColumns;
        } catch (e) {}
        return lineLength;
      }(),
      colors: stdout.supportsAnsiEscapes, // Colorful log messages
      printEmojis: false,
      printTime: true,
    ),
  ),
);

2. Init

MaterialApp(
  title: 'Visual Console Demo',
  home: const MyHomePage(),
  builder: (context, child) {
    return Stack(
      children: [
        child!,
        const Console(),
      ],
    );
  },
);

Usage

logger.v("verbose");
logger.d("debug");
logger.i("info");
logger.w("warning");
logger.e("error");
logger.wtf("wtf");

Screen Shot

截图

Additional information

this package is a plugin of Logger;

About

A Visual Console inspired by VConsole.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages