@vikrant-kumar/termcolor-log
v1.0.2
Published
A lightweight Node.js terminal logger with colorful and structured console output for better debugging and CLI logging
Downloads
170
Maintainers
Readme
🎨 @vikrant-kumar/termcolor-log
🚀 A lightweight, powerful and developer-friendly Node.js terminal logger with colors for clean, structured and readable console output.
🔍 Keywords (SEO)
nodejs logger, terminal logger, console logger, chalk logger, cli logger, typescript logger, terminal colors, logging library, color logger
🚀 Features
- 🎨 Colorful terminal logs (SUCCESS, ERROR, WARNING, INFO)
- 📦 Clean and structured output formatting
- 📏 Auto text wrapping (fixed width support - 80 chars)
- ⚡ Lightweight & fast performance
- 🧠 Simple and developer-friendly API
- 🔥 Perfect for CLI tools & backend logging
📦 Installation
npm install @vikrant-kumar/termcolor-log🛠️ Usage
import { successLog, errorLog, warningLog, infoLog } from "@vikrant-kumar/termcolor-log"
successLog("Server started successfully 🚀")
errorLog("Database connection failed ❌")
warningLog("Memory usage is high ⚠️")
infoLog("Application is running ℹ️")🖥️ Output Preview
--------------------------------------------------------------------------------
SUCCESS - Server started successfully 🚀
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
ERROR - Database connection failed ❌
--------------------------------------------------------------------------------🎯 API Reference
| Function | Description | | ------------ | ------------------------------ | | successLog() | Logs success message in green | | errorLog() | Logs error message in red | | warningLog() | Logs warning message in yellow | | infoLog() | Logs info message in cyan |
⚙️ Default Messages
successLog() // Operation completed successfully
errorLog() // Something went wrong during execution
warningLog() // Potential issue identified
infoLog() // Just a heads up💡 Example
successLog("User created successfully")
errorLog("Invalid credentials")
warningLog("API response is slow")
infoLog("Server running on port 3000")🧱 Built With
- TypeScript
- Chalk
📌 Why @vikrant-kumar/termcolor-log?
- Cleaner than
console.log - Improves debugging experience
- Structured and readable logs
- Minimal setup, maximum clarity
📈 Use Cases
- Backend logging (Node.js / Express)
- CLI tools & automation scripts
- Debugging & development logs
- Production-ready logging format
📜 License
MIT © Vikrant Kumar
👨💻 Author
Vikrant Kumar
- GitHub: https://github.com/vikrant-kumar-cse/-vikrant-termcolor-log
- npm: https://www.npmjs.com/package/@vikrant-kumar/termcolor-log
⭐ Support
If you like this package, consider giving it a ⭐ on GitHub and sharing it with the community 🚀
