@nadim.pro/logstamp
v1.0.0
Published
Tiny colorful logger with timestamps for Node.js
Maintainers
Readme
logstamp
logstamp is a lightweight Node.js logger that adds timestamps and colored output to your console logs.
It helps you easily see information, warnings, and errors with clear colors.
🚀 Installation
npm install logstamp🧩 Usage
import { log } from "logstamp";
// basic logs
log.info("Server started on port", 8080);
log.warn("Memory usage is high");
log.error("Database connection failed");
// custom color log
log.custom("debug", "36", "This is cyan text");🖥️ Example Output
[12:04:51] INFO Server started on port 8080
[12:04:52] WARN Memory usage is high
[12:04:53] ERROR Database connection failed
[12:04:54] DEBUG This is cyan text🎨 Color Levels
| Level | Description | Color | ANSI Code |
| ----- | ---------------------- | --------- | --------- |
| INFO | General information | 🟢 Green | 32 |
| WARN | Warnings or risks | 🟡 Yellow | 33 |
| ERROR | Errors and exceptions | 🔴 Red | 31 |
| DEBUG | Custom or debug output | 🔵 Cyan | 36 |
🧠 Notes
- Works in Node.js (ESM or CommonJS).
- Automatically adds a timestamp in format
HH:MM:SS. - You can log strings, numbers, or objects.
- Supports custom colors using
log.custom(level, colorCode, message).
License
MIT License © 2025 Nadim Alzoubi
