πŸš€ log_er - Powerful & Colorful Logging for Flutter & Dart

Dart CI Pub Version License GitHub Stars GitHub Issues GitHub Forks Code Size

πŸ”Ή log_er is a structured, colorful, and emoji-enhanced logging package for Dart & Flutter.
πŸ”Ή Supports custom log levels, JSON logging, stack traces, and more!


🎯 Features

βœ… Color-coded logs for better readability 🎨
βœ… Supports multiple log levels 🏷️
βœ… Easy-to-use API πŸš€
βœ… Emoji-enhanced log messages πŸ˜ƒ
βœ… Prettified JSON logging πŸ“
βœ… File and API logging support (soon!) πŸ”₯


πŸ“¦ Installation

Add the following to your pubspec.yaml:

dependencies:
  log_er: ^2.0.4

Then run:

flutter pub get

πŸš€ Quick Start

1️⃣ Import the Package

import 'package:log_er/log_er.dart';

2️⃣ Log Messages

Log.debug("Initializing app...", fileName: "main.dart");
Log.info("User logged in successfully.", fileName: "auth_service.dart");
Log.warning("Low memory detected!", fileName: "performance_monitor.dart");
Log.error("Failed to fetch API data!", fileName: "network_service.dart");
Log.fatal("System crashed!", fileName: "core_system.dart");

🏷️ Log Levels

Level Emoji Usage Example
DEBUG 🍺 Log.debug("Debugging...", fileName: "main.dart");
INFO πŸ”΅ Log.info("User logged in.", fileName: "auth.dart");
WARNING 🚨 Log.warning("Slow network detected.", fileName: "network.dart");
ERROR πŸ”₯ Log.error("Database connection failed!", fileName: "db.dart");
FATAL πŸ’€ Log.fatal("Critical failure!", fileName: "system.dart");
SPECIAL πŸ’œ Log.special("Feature flag enabled.", fileName: "config.dart");
DATA βœ… Log.data({"user": "John"}, fileName: "api.dart");

log_er Banner


πŸ“Š Logging Structured Data

Log.json({
  "status": "success",
  "user": {"id": 1, "name": "John Doe"}
}, fileName: "api_service.dart");

βš™οΈ Configuration

Customize logging behavior by passing a custom logger:

Log(logger: FileLogger("logs.txt")).info("App started", fileName: "main.dart");

πŸ›  Upcoming Features

  • File-based logging
  • API remote logging
  • Log filtering & searching
  • Performance optimizations

πŸ“œ License

log_er is licensed under the MIT License.


πŸ“Œ Made with ❀️ by Developeryilmaz.
πŸš€ Star this repo on GitHub if you found it useful! 🌟