flutter_devlog library

A lightweight, zero-dependency, extensible colored console logger for Dart and Flutter.

import 'package:flutter_devlog/flutter_devlog.dart';

void main() {
  DevLog.info('App started');
  DevLog.error('Failed', error: e, stackTrace: s);
  DevLog.json({'id': 1, 'name': 'Sam'}, title: 'User');

  // Custom level:
  const network = LogLevel('NETWORK', LogColor.blue, LogPriority.api);
  DevLog.log('Connecting...', level: network);

  // Per-module logger:
  final authLog = DevLog.scoped('Auth');
  authLog.success('Logged in');
}

Classes

DevLog
A static, easy-to-use colored logger for Dart and Flutter.
LogColor
ANSI escape codes used to colorize console output.
LogLevel
Describes a single log level: a display name (shown as the log channel), an ANSI color, and a priority used for filtering.
ScopedLogger
A logger bound to a scope that auto-tags every message.

Enums

LogPriority
Relative importance of a log, used by DevLog.minPriority to filter out low-importance logs cheaply. Ordered from least to most important.