@hafizmbilal/smart-logger
v1.0.0
Published
Production-ready Winston logger with daily rotation, safe JSON handling, and logger.log() alias
Downloads
104
Maintainers
Readme
Smart Logger
A production-ready Winston logger with:
- Daily rotating logs
- Separate per-level logs
- Combined logs
- Safe JSON & circular object handling
logger.log()alias (routes toinfo)- Multi-argument support
Install
npm install smart-logger
## Usage
const logger = require("@hafizmbilal/smart-logger");
logger.log("Hello world");
logger.info("Server started", { port: 3000 });
logger.warn("Slow request", { timeMs: 1200 });
logger.error("DB failed", new Error("Connection refused"));
## Log Structure
logs/
combined/
error/
warn/
info/
debug/