π log_er - Powerful & Colorful Logging for Flutter & Dart
πΉ 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 π·οΈ
β
Custom color log functions π
β
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
Import the Package
import 'package:log_er/log_er.dart';
Log Messages
Log.debug("Initializing app...");
Log.info("User logged in successfully.");
Log.warning("Low memory detected!");
Log.error("Failed to fetch API data!");
Log.fatal("System crashed!");
Log.json('{ "status": "success", "user": "John Doe" }');
π·οΈ Log Levels
Level | Emoji | Usage Example |
---|---|---|
DEBUG | πΉ | Log.debug("Debugging..."); |
INFO | β | Log.info("User logged in."); |
WARNING | π¨ | Log.warning("Slow network detected."); |
ERROR | β | Log.error("Database connection failed!"); |
FATAL | π | Log.fatal("Critical failure!"); |
JSON | πΊ | Log.json("{ "status": "ok" }"); |
π Custom Color Log Methods
Log.red("This is a red message.");
Log.green("This is a green message.");
Log.yellow("This is a yellow message.");
Log.blue("This is a blue message.");
Log.cyan("This is a cyan message.");
Log.magenta("This is a magenta message.");
π 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! π