Package Exports
- @variablesoftware/logface
Readme
@variablesoftware/logface 🪵😎
A fun, lightweight, structured console-style logger with tag-based filtering for TypeScript projects.
✨ Features
- Drop-in replacements for
console.*
methods - Scoped tagging via
log.options({ tag })
- Filters logs with
LOG
orLOG_VERBOSE
environment variables - Per-call configuration with timestamps and level formatting
- Wildcard filtering support (e.g.
auth:*
,metrics*
)
🚀 Install
npm install @variablesoftware/logface
# or
yarn add @variablesoftware/logface
🔧 Quick Usage
import { log } from "@variablesoftware/logface";
log.debug("booting up");
log.warn("careful now");
log.options({ tag: "auth" }).info("user signed in");
log.options({ tag: "metrics", timestamp: true }).info("CPU: %d%%", 92);
📤 Output Format
[D][init] Booting...
[I][auth] Login successful
[L][metrics] 200 OK
Use log.setup()
to enable timestamps or full level names.
🔍 Filtering
Use LOG
or LOG_VERBOSE
to filter logs by tag or level:
LOG=auth node app.js
LOG=metrics,debug,auth* node app.js
📚 Full Guide
For wildcard matching, structured output, test helpers, global setup, and advanced filtering:
➡️ See LOGGING.md for full logging level guidance
Built with ❤️ by @variablesoftware