Search packages, repositories and app categories

quick_log cover
Package detailsv5.5.3

quick_log

An easy to use and extendable logging package for Dart. Especially useful for use in libraries, as it allows applications to control logging from the imported libraries.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
4.9K
Likes
21
Pub points
150

Install package

flutter pub add quick_log

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Quick Log is a lightweight, extensible logging package for Dart designed for simplicity and flexibility. It enables libraries to emit logs that can be controlled by the host application, making it ideal for debugging and monitoring in shared code. With support across all major platforms, it provides a consistent logging experience. The package allows developers to customize log levels, output formats, and destinations, while maintaining minimal overhead. Its modular design makes it easy to integrate into existing projects.

Use cases

  • Library-level logging
  • Cross-platform debugging
  • Runtime log control
  • Application monitoring
  • Error tracking
  • Development-time diagnostics

Key features

  • Configurable log levels
  • Extensible backend system
  • Centralized log management
  • Platform-agnostic
  • Minimal performance impact
  • Customizable output formatting

Suitable for

  • Dart library authors
  • Cross-platform apps
  • Debugging tools
  • Real-time monitoring systems
  • Developer-facing utilities

Considerations

  • Requires application-level configuration
  • May need additional setup for advanced features
  • Not optimized for high-volume production logging
  • Limited built-in analytics
  • Depends on external configuration files

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

An easy to use and extendable logging package for Dart. Especially useful for use in libraries, as it allows application to control logging from the imported libraries.

Console Printer Output

Features

  • Ability to filter logs from imported libraries
  • 100% configurable (print logs to console, write to file or send to backend all possible!)
  • Similar to other logging packages, so nothing new to learn

Usage

A simple usage example:

import 'package:quick_log/quick_log.dart';

void main() {
  const log = Logger('LogExample');

  log.debug('this is a debug message');
  log.info('this is an info message');
}

Configuring logger output:

import 'package:quick_log/quick_log.dart';

void main() {
  const log = Logger('LogExample');

  Logger.writer = ConsolePrinter(minLevel: LogLevel.info);

  log.d('this is a debug message');
  log.i('this is an info message');
}

Ignoring logs:

import 'package:quick_log/quick_log.dart';

class ExampleLogger extends Logger {
  const ExampleLogger(String name) : super(name, 'ExampleLogger');
}

void main() {
  const log = ExampleLogger('LogExample');

  Logger.writer = ConsolePrinter(onlyTags: []);
  // Or
  Logger.writer = ConsolePrinter(exceptTags: [log.name]);

  // These messages won't be printed
  log.d('this is a debug message');
  log.i('this is an info message');
}

Can be used in tests by using the LogStreamWriter:

import 'package:quick_log/quick_log.dart';

test('test', () {
  const log = Logger('LogExample');
  final writer = LogStreamWriter();
  Logger.writer = writer;

  log.i('this line was executed');
  
  expect(writer.pastMessages.length, 1);
  expect(writer.lastMessage.message, 'this is an info message');
});

Please file feature requests and bugs at the issue tracker.

Categories

Dependencies

Dependency list 3 items

Source repository

Projects using this package