@qurvii/color-logger
v1.1.0
Published
colorful console logger for node.js with timestamps
Readme
🎨 colorful-logger
Stylish, single-line, colorful console logger for Node.js with timestamps and customizable colors.
📦 Installation
npm install @qurvii/color-logger
✨ Features
🕒 Timestamped logs (24-hour format)
🟦 Predefined log levels: info, warn, error, success
🎨 Custom log tags with foreground/background colors
💡 Based on modern ESM (ES modules)
⚙️ Lightweight and perfect for CLI tools or Node.js apps
📘 Usage
import log from "@qurvii/color-logger";
log.info("Server started successfully");
log.warn("Low disk space");
log.error("Connection to DB failed");
log.success("User created successfully");
log.custom("debug", "This is a debug message", {
fg: "cyan",
bg: "black"
});
| Method | Icon | Description | Color Style |
| --------------- | ---- | --------------------- | ------------------ |
| `log.info()` | ℹ️ | Informational message | White on Blue |
| `log.warn()` | ⚠️ | Warning message | Black on Yellow |
| `log.error()` | ❌ | Error message | White on Red |
| `log.success()` | ✅ | Success confirmation | White on Green |
| `log.custom()` | 🎛️ | Custom label + colors | Fully customizable |
🎛 Custom Log Example
js
Copy
Edit
log.custom("build", "Compiling project...", {
fg: "black", // Text color
bg: "cyan" // Background color
});
📁 Project Structure
css
Copy
Edit
colorful-logger/
├── src/
│ └── logger.js
├── test.js
├── package.json
├── .gitignore
├── LICENSE
└── README.md
📄 License
MIT © SACHINRAWAT
🌐 Useful Links
GitHub Repo : https://github.com/webdeveloper-sachin/logger-pakage