Search packages, repositories and app categories

Package detailsv1.0.15

snug_logger

Snug Logger - Cozy, Fun, Powerful! Elevate your coding with simplicity and a touch of fun. Logging made delightful.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
144
Likes
12
Pub points
160

Install package

flutter pub add snug_logger

Package Overview

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

Snug Logger is a delightful and powerful logging package for Flutter applications, designed to make debugging enjoyable and intuitive. With a cozy, fun aesthetic, it enhances developer experience by providing clear, colorful, and structured logs across all platforms. It supports rich output formatting and integrates seamlessly into development workflows. Ideal for teams seeking both functionality and a touch of personality in their logging process.

Use cases

  • Real-time debugging during app development
  • Enhancing team collaboration with readable logs
  • Monitoring app behavior in test environments
  • Simplifying error tracking in complex flows
  • Adding fun to routine debugging tasks

Key features

  • Colorful and expressive log output
  • Cross-platform support (Android, iOS, Web, macOS, Windows, Linux)
  • Simple integration via pub add
  • Customizable log levels and styles
  • Lightweight and fast performance
  • Fun, engaging developer experience

Suitable for

  • Flutter developers who value aesthetics in tools
  • Teams wanting consistent and readable logs
  • Developers prioritizing enjoyable debugging
  • Projects requiring lightweight yet effective logging
  • Those seeking a playful alternative to standard loggers

Considerations

  • Not recommended for production logging without filtering
  • May be too visually prominent in high-volume scenarios
  • Best suited for development and testing phases
  • Limited advanced features compared to enterprise loggers
  • Visual style may not fit all team preferences

Original README

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

Snug Logger 🛋️

Snug_Logger

A colorful, structured logger for Flutter apps.

Snug Logger helps you:

  • read logs faster with clean formatting and colors
  • log by intent (debug, info, error, production)
  • inspect Dio network traffic with optional cURL output
  • get readable stack traces for error debugging

Install

dependencies:
  snug_logger: ^1.0.15
flutter pub get

Quick Start

import 'package:snug_logger/snug_logger.dart';

snugLog('App started', logType: LogType.info);
snugLog('Fetching user profile', logType: LogType.debug);
Error Logging with Stack Trace
try {
  throw Exception('Something went wrong');
} catch (error, stackTrace) {
  snugLog(
    error,
    logType: LogType.error,
    stackTrace: stackTrace,
  );
}

Network Logging (Dio)

_dio.interceptors.add(
  SnugDioLogger(
    requestHeaders: true,
    requestData: true,
    responseHeaders: true,
    responseData: true,
    showCurl: true,
    logPrint: (object) => debugPrint(object.toString()),
  ),
);

When showCurl: true is enabled, Snug Logger prints reproducible cURL commands so you can quickly share failing requests with backend teams.

What You Can Configure

  • requestHeaders: include request headers
  • requestData: include request body/query
  • responseHeaders: include response headers
  • responseData: include response body
  • showCurl: print cURL command for each request

Advanced Stack Trace Utilities

If you want direct control over stack trace formatting:

final formatted = StackTraceFormatter.format(stackTrace);
final terse = StackTraceFormatter.formatTerse(stackTrace);
final snug = StackTraceFormatter.formatForSnugLogger(stackTrace);

Contributing

Thanks to Contributors

Thanks to everyone who contributed features, fixes, docs, and reviews, including the cURL printing enhancement.

Contributor Wall

Contributors

Categories

Dependencies

Dependency list 1 items

Source repository

Projects using this package

No data available yet.