log_er 2.0.2 copy "log_er: ^2.0.2" to clipboard
log_er: ^2.0.2 copied to clipboard

Log_er - Powerful & Colorful Logging for Flutter

πŸ“œ Log_er - Powerful & Colorful Logging for Flutter πŸš€ #

Log_er Version License

🌟 Overview #

Log_er is a powerful, visually appealing, and easy-to-use logging package for Flutter and Dart applications.
It provides structured log output, emoji-based categories, and JSON formatting with color-coded messages.

🎯 Key Features #

βœ… Color-coded logs for easy debugging
βœ… Supports multiple log levels (debug, info, warn, error, fatal, special, data, json)
βœ… Emoji-enhanced logs for better visibility
βœ… JSON pretty-printing with auto-formatting
βœ… StackTrace support for debugging errors
βœ… Text wrapping at 80 characters for readability
βœ… Custom log messages with any emoji and color
βœ… Log messages enclosed in * for clarity


πŸ“¦ Installation #

To install Log_er, add the package to your pubspec.yaml file:

dependencies:
  log_er: ^2.0.1+1


flutter pub get


import 'package:log_er/log_er.dart';

void main() {
  Log.debug(" Debug message: Used for development testing.");
  Log.info("β„Ή Info message: General system information.");
  Log.warning(" Warning: Something might need attention.");
  Log.error(" Error: A critical issue occurred!");
  Log.special(" Special log event.");
  Log.data(" Data successfully processed.");
}


**********************************
* 🐞 [DEBUG] Debug message: Used for development testing. *
**********************************

**********************************
* πŸ”΅ [INFO] ℹ️ Info message: General system information. *
**********************************

**********************************
* ⚠️ [WARNING] 🚨 Warning: Something might need attention. *
**********************************

**********************************
* πŸ”₯ [ERROR] πŸ”₯ Error: A critical issue occurred! *
**********************************

**********************************
* πŸ’€ [FATAL] πŸ’€ Fatal error! System crash. *
**********************************

**********************************
* πŸ’œ [SPECIAL] πŸ’œ Special log event. *
**********************************

**********************************
* πŸ“Š [DATA] πŸ“Š Data successfully processed. *
**********************************


void main() {
  String jsonString = '''
  {
    "user": {
      "name": "Alice",
      "age": 25,
      "contact": {
        "email": "alice@example.com",
        "phone": "+123456789"
      },
      "bio": "Software Engineer. Loves AI."
    }
  }
  ''';

  Log.json(jsonString);
}


**********************************
* πŸ“œ [JSON] 
{
"user":
 {
"name": "Alice",
 "age": 25,
 "contact":
  {
"email": "alice@example.com",
 "phone": "+123456789"
  },
 "bio": "Software Engineer. Loves AI."
 }
} *
**********************************


void main() {
  try {
    throw Exception("Something went wrong!");
  } catch (e, stackTrace) {
    Log.error("πŸ”₯ Critical Error: $e", stackTrace: stackTrace);
  }
}


**********************************
* πŸ”₯ [ERROR] Critical Error: Exception: Something went wrong! *
**********************************
#0      main (file://...)
#1      _runMain (dart:...)
...

πŸ“Œ Why is this useful?

Captures and logs stack traces automatically
Helps track where the error occurred for easier debugging
βœ… 4️⃣ Custom Logs with Emojis and Colors
dart
Kopyala
DΓΌzenle
void main() {
  Log.log("✨", "CUSTOM", "This is a custom log!", color: '\x1B[35m');
  Log.log("πŸš€", "SYSTEM", "System started successfully.", color: '\x1B[32m');
}
πŸ”Ή Expected Output
markdown
Kopyala
DΓΌzenle
**********************************
* ✨ [CUSTOM] This is a custom log! *
**********************************

**********************************
* πŸš€ [SYSTEM] System started successfully. *
**********************************
πŸ“Œ Why is this useful?

Define your own log categories
Customize with unique emojis and colors
βœ… 5️⃣ Long Message Wrapping for Readability
dart
Kopyala
DΓΌzenle
void main() {
  String longMessage = "πŸš€ This is a very long log message that contains a lot of text. "
      "It is used to test how the logging system handles large messages "
      "and ensures that the text wraps properly instead of overflowing the screen.";

  Log.info(longMessage);
}
πŸ”Ή Expected Output (wrapped at 80 characters)
markdown
Kopyala
DΓΌzenle
**********************************
* πŸ”΅ [INFO] πŸš€ This is a very long log message that contains a lot of text. *
It is used to test how the logging system handles large messages
and ensures that the text wraps properly instead of overflowing the screen.
**********************************
πŸ“Œ Why is this useful?

Ensures long messages do not break formatting
Automatically wraps text to improve readability
🎯 Comparison with Other Logging Packages
Feature	log_er	logger	dart:developer
Emoji-based logs	βœ… Yes	❌ No	❌ No
Color-coded logs	βœ… Yes	βœ… Yes	❌ No
JSON auto-formatting	βœ… Yes	❌ No	❌ No
StackTrace support	βœ… Yes	βœ… Yes	βœ… Yes
Custom log categories	βœ… Yes	❌ No	❌ No
Bordered log formatting	βœ… Yes	❌ No	❌ No
πŸ“œ License
Log_er is released under the MIT License. You are free to use, modify, and distribute this package.

πŸš€ Final Thoughts
βœ… Visually appealing logs with emojis & colors
βœ… Pretty JSON logging with auto-formatting
βœ… Handles errors and stack traces automatically
βœ… Supports long text wrapping for better readability
βœ… Custom log messages with any emoji and color

πŸš€ Your logging is now clean, structured, and beautiful! πŸŽ‰
If you have any questions or feature requests, feel free to ask! 😊

yaml
Kopyala
DΓΌzenle

---

### **πŸš€ Why This `README.md` is Effective**
βœ… **Includes all key features with explanations**  
βœ… **Uses emojis and formatting for better readability**  
βœ… **Provides detailed usage examples with expected output**  
βœ… **Comparison table shows why `log_er` is better**  
βœ… **Makes the package look professional and user-friendly**  

πŸš€ **Your package now has a polished, professional, and visually engaging `README.md`!** πŸŽ‰  
Let me know if you need any further improvements! 😊
1
likes
0
points
333
downloads

Publisher

verified publisherpharraxsoftware.com

Weekly Downloads

Log_er - Powerful & Colorful Logging for Flutter

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

characters, flutter

More

Packages that depend on log_er