1.0.0 â€ĸ Published 7 months ago

log101 v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

📝 Console Logger Utility

A đŸ› ī¸ simple and 🎨 customizable logging utility for styled đŸ–Ĩī¸ console messages. This utility provides predefined styles for different log 📊 levels (e.g., â„šī¸ info, âš ī¸ warning, 🚨 danger, ❌ error, ✅ success) and allows full đŸ› ī¸ customization for additional ⚡ flexibility.

đŸ“Ĩ Installation

Install the đŸ“Ļ package via npm:

npm install log101

đŸ–ąī¸ Usage

Import the package into your đŸ–Ĩī¸ project:

import log from "log101";

🔍 Logging with Predefined Styles

// ✅ Default style (đŸŸĸ green, đŸŸĸ bold, 📏 large text)
log("This is a default message");

// 🎨 Predefined styles for log 📊 levels
log("â„šī¸ Information message", "info");      // đŸ”ĩ Blue text for â„šī¸ informational logs
log("âš ī¸ Warning message", "warning");        // 🟠 Orange text for âš ī¸ warnings
log("🚨 Critical issue detected!", "danger"); // 🔴 Red text for 🚨 critical issues
log("❌ An error occurred!", "error");        // 🛑 Dark 🔴 red text for ❌ errors
log("✅ Operation was successful!", "success"); // đŸŸĸ Green text for ✅ success

đŸ› ī¸ Logging with Custom Styles

You can pass a 🎨 custom style object to override the predefined styles:

log("đŸ–Œī¸ Custom styled message", {
  color: "#FF5733",
  fontSize: "18px",
  fontWeight: "normal",
  fontStyle: "italic"
});

🎨 Predefined Styles

Style📝 Description
defaultđŸŸĸ Green, đŸŸĸ bold, 📏 xx-large text
infođŸ”ĩ Blue, đŸ”ĩ bold, 📏 large text
warning🟠 Orange, 🟠 bold, 📏 large text
danger🔴 Red, 🔴 bold, 📏 large text
error🛑 Dark 🔴 red, 🛑 bold, 📏 large text
successđŸŸĸ Green, đŸŸĸ bold, 📏 large text

🎨 Dynamic CSS String

You can also pass a âœī¸ raw CSS string if you prefer:

log("🔮 Direct CSS example", "color:purple;font-size:24px;font-weight:bold;text-decoration:underline");

📜 License

This project is licensed under the âš–ī¸ MIT License.

1.0.0

7 months ago