
Product
Announcing Precomputed Reachability Analysis in Socket
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
@variablesoftware/logface
Advanced tools
🎛️🪵😎 A fun, lightweight, structured console-style logger with tag-based filtering for TypeScript projects.
🎛️🪵😎 A fun, lightweight, structured console-style logger with tag-based filtering for TypeScript projects.
console.*
methods: debug
, info
, warn
, error
, log
log.options({ tag })
LOG
or LOG_VERBOSE
environment variables (supports wildcards)log.level = 'warn'
or log.setLogLevel('warn')
to suppress lower levels (unless LOG/LOG_VERBOSE is set)auth:*
, metrics*
)log.setup({ ... })
LOG
/LOG_VERBOSE
match, or if log.level
is 'debug'
and DEBUG=1
is setlog.level = 'silent'
or log.setLogLevel('silent')
suppresses all outputLOG
/LOG_VERBOSE
if set, otherwise uses the runtime log levelpnpm add @variablesoftware/logface
import { log } from "@variablesoftware/logface";
// Basic usage
log.debug("Boot sequence initiated");
log.info("App started on port %d", 3000);
log.warn("Disk usage at %d%%", 91);
log.error("Database connection failed: %s", err.message);
// Scoped/tagged logs
log.options({ tag: "auth" }).debug("User login event");
log.options({ tag: "metrics", timestamp: true }).info("Memory: %dMB", 182);
log.options({ tag: "api", levelShort: false }).warn("Rate limit exceeded");
// Global setup
log.setup({ timestamp: true, levelShort: false });
// Runtime log level (NEW)
log.level = "warn"; // Only warn, error, and log will be emitted
log.setLogLevel("error"); // Only error and log will be emitted
log.level = "silent"; // Suppress all output
// Restore to default
log.level = "debug";
[D][init] Booting...
[I][auth] Login successful
[L][metrics] 200 OK
Use log.setup()
to enable timestamps or full level names.
Use LOG
or LOG_VERBOSE
to filter logs by tag or level:
LOG=auth node app.js
LOG=metrics,debug,auth* node app.js
LOG="!foo;auth,debug" node app.js # Negation: suppress 'foo' unless also matches 'auth' or 'debug'
auth:*
, metrics*
).!
to suppress logs matching that pattern, unless also matched by a positive pattern. Example: LOG="!foo;auth,debug"
suppresses logs with tag foo
unless they also match auth
or debug
.log.level = "warn"; // Only warn, error, and log
log.level = "silent"; // Suppress all output
Debug logs are only shown if LOG
/LOG_VERBOSE
match, or if log.level
is 'debug' and DEBUG=1
is set in the environment.
For wildcard matching, structured output, test helpers, global setup, and advanced filtering:
➡️ See LOGGING.md for full logging level guidance
MIT © Rob Friedman / Variable Software
Built with ❤️ by @variablesoftware
Thank you for downloading and using this project. Pull requests are warmly welcomed!
Logface supports powerful customization via a config file. You can control emoji, color, and more for your log output.
cp logface.example.config.js logface.config.js
logface.config.js
to your liking.// logface.config.js
module.exports = {
emojiRandom: true, // Random emoji per log message
emojis: {
debug: ["🐛", "🔍", "🦠"],
info: ["ℹ️", "💡", "🧭"],
log: ["📝", "📄", "🗒️"],
warn: ["⚠️", "🚧", "🛑"],
error: ["🔥", "💥", "💣"],
},
colorEnabled: true, // Enable/disable color
colorLibrary: "chalk", // 'chalk', 'picocolors', 'colorette', or 'kleur'
};
Logface disables emoji and color automatically during tests for stable output. You can also set these manually:
module.exports = {
emojiRandom: false,
emojis: { debug: "", info: "", log: "", warn: "", error: "" },
colorEnabled: false,
};
emojiRandom
: true
for random emoji per log, false
for fixed.emojis
: Object mapping log levels to emoji (array or string).colorEnabled
: Enable/disable color output.colorLibrary
: Choose color library: 'chalk'
, 'picocolors'
, 'colorette'
, 'kleur'
..js
for CommonJS or ESM (depends on your package.json
type
)..mjs
for guaranteed ESM.// logface.config.mjs
export default {
emojiRandom: true,
emojis: {
debug: ["🐛", "🔍", "🦠"],
info: ["ℹ️", "💡", "🧭"],
log: ["📝", "📄", "🗒️"],
warn: ["⚠️", "🚧", "🛑"],
error: ["🔥", "💥", "💣"],
},
colorEnabled: true,
colorLibrary: "picocolors",
};
logface.config.js
to your .gitignore
to avoid committing user-specific config.logface.example.config.js
for a template.For more, see LOGGING.md.
FAQs
🎛️🪵😎 A fun, lightweight, structured console-style logger with tag-based filtering for TypeScript projects.
The npm package @variablesoftware/logface receives a total of 119 weekly downloads. As such, @variablesoftware/logface popularity was classified as not popular.
We found that @variablesoftware/logface demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
Product
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.