Snug Logger ๐๏ธ
Spice up your logs with Snug Logger! ๐๐๏ธ
Click here to try it out! ๐โจ
Welcome to Snug Logger! ๐
Wave goodbye to mundane, dull logs and embrace the colorful, emoji-filled world of Snug Logger! ๐๐ปโจ With us, debugging is no longer a chore but a lively, fun-filled experience.
Why Choose Snug Logger?
- ๐๏ธ Cozy to Use: Vibrant and clear log messages that are as comforting as your favorite hoodie.
- ๐จ Color-Coded Clarity: Instantly spot log levels with our dynamic colors and emojis.
- ๐ Professional Structure: Playful yet organized, ensuring your logs are both engaging and easy to navigate.
Features:
1. Colorful Logging:
- Brighten up your log readability with dynamic colors for different log levels.
- Emojis bring your logs to life: ๐ for debug, โน๏ธ for info, ๐จ for error, and more!
2. Versatile Log Levels:
- Log various levels:
debug
,info
,error
, andproduction
. Each has its own role, keeping your logs purposeful and organized.
3. SnugDioLogger for Network Requests:
- Enhance your network request logs with SnugDioLogger for detailed insights into every request and response.
- Tailor what you logโheaders, request data, and response contentโwith fine-tuned control.
4. Structured Log Formatting:
- Logs follow a clear, structured template, blending fun with functionality.
- Consistent formatting across all levels for a polished, professional look.
Installation:
Getting started with Snug Logger is a breeze! Add it to your pubspec.yaml
file:
dependencies:
snug_logger: ^1.0.10
Then, fetch the package:
flutter pub get
Quick Start:
Import the Package:
import 'package:snug_logger/snug_logger.dart';
Basic Usage:
Bring some flair to your logs with just a few lines of code!
Example: Info Log
snugLog(
"This is an info message, filled with dad-joke-level wisdom and charm! ๐จโ๐งโ๐ฆ๐คฃ",
logType: LogType.info
);
Example: Debug Log
snugLog(
"Debugging with precision! No clowns involved, just pure detective work. ๐คก๐",
logType: LogType.debug
);
Example: Error Log
snugLog(
"Oops! Something went wrong, but don't worry, I've got the toolkit ready! ๐ฆธโโ๏ธ๐ง",
logType: LogType.error,
stackTrace: StackTrace.current
);
Example: Production Log
snugLog(
"Production-ready logs: polished, professional, and prepared for the spotlight! ๐ญ๐",
logType: LogType.production
);
Network Logging with SnugDioLogger:
Integrate SnugDioLogger for detailed network request logs:
_dio.interceptors.add(
SnugDioLogger(
requestHeaders: true,
requestData: true,
responseHeaders: true,
responseData: true,
logPrint: (object) => debugPrint(object.toString()),
),
);
You control exactly what gets loggedโheaders, request data, or full responses. ๐ต๏ธโโ๏ธ
Join the Snug Squad!
Got ideas or feedback? Weโre all ears! Hereโs how to get involved:
- ๐ฌ Open an Issue
- ๐ฅ Submit a Pull Request
Letโs make logging a delightful part of coding! ๐โจ
Why did the programmer go broke? Because they used up all their cache! ๐ธ๐
Libraries
- snug_logger
- A cozy and efficient logging package for Flutter applications.