
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
missionlog
Advanced tools
π lightweight TypeScript logger β’ level based filtering and tagging β’ weighs in at 500 bytes
π missionlog is a lightweight, structured logging library designed for performance, flexibility, and ease of use.
It works as a drop-in replacement for console.log or ts-log, featuring tag-based organization, log level filtering, and customizable output handlingβall in a tiny (~1KB) package.
β Fully Typed (TypeScript) β’ β ESM & CJS Support β’ β Zero Dependencies
missionlog?Compared to other logging libraries like ts-log, missionlog offers:
β
Drop-in Replacement for console.log & ts-log β Start using it instantly.
β
Seamless Upgrade to Tag-Based Logging β Reduce log clutter by dynamically focusing on what's important.
β
Configurable Log Levels β Adjust visibility for each tag at runtime to filter noise.
β
Customizable Output β Send logs anywhere: console, JSON, cloud services.
β
Blazing Fast Performance β O(1) log level lookups for minimal overhead.
β
TypeScript-First β Full type safety, no need for @types.
β
Works Everywhere β Browser, Node.js, Firebase, AWS Lambda etc.
npm i missionlog
yarn add missionlog
missionlog lets you filter logs dynamically to avoid clutter and focus on what's importantβwithout forcing you to use tags.
import { DEFAULT_TAG, log, LogLevel, LogLevelStr, tag } from "missionlog";
import chalk from "chalk";
// Use the built-in dummy logger so becomes a no-op
log.info(tag.engineering, "Engaging warp drive! Destination: The Final Frontier.");
// Let's set some tags
log.init({ Engineering: LogLevel.INFO, Transporter: LogLevel.DEBUG });
// Log with a tag
log.info(tag.Engineering, "Warp Factor 9!");
// Override the built-in dummy with custom behavior
log.init({ Engineering: LogLevel.INFO }, createLogHandler());
// Engineering's level is INFO+ so this gets logged!
log.info(tag.Engineering, "Warp Factor 5.");
// No tag so works like console and uses the default level
log.error("Alert! Evil twin detected!");
// Gets filtered since Engineering is INFO+
log.debug(tag.Engineering, "Warp Factor 9!");
// Update tag levels and override default (INFO)
log.init({
Engineering: LogLevel.TRACE,
[DEFAULT_TAG]: LogLevel.ERROR,
Transporter: LogLevel.DEBUG,
});
// Log an error
const error = new Error("Warp core breach!");
log.error(tag.Engineering, "π¨ Red Alert!", error.message);
// Show some color!
log.debug(tag.Transporter, "β¨ Beam me up, Scotty!");
// Log objects properly
log.warn(tag.Transporter, "Transporter anomaly detected,", { evilTwin: true });
// Replace dummy logger with custom behavior
function createLogHandler() {
const logConfig: Record<
LogLevelStr,
{ color: (text: string) => string; method: (...args: unknown[]) => void }
> = {
ERROR: { color: chalk.red, method: console.error },
WARN: { color: chalk.yellow, method: console.warn },
INFO: { color: chalk.green, method: console.log },
DEBUG: { color: chalk.magenta, method: console.log },
TRACE: { color: chalk.cyan, method: console.log },
OFF: { color: () => '', method: () => {} }, // No-op
};
return (level: LogLevelStr, tag: string, message: unknown, params: unknown[]) => {
const { method, color } = logConfig[level];
const logLine = `[${color(level)}] ${tag ? tag + ' - ' : ''}${message}`;
method(logLine, ...params);
};
}

MIT License
Β© 2019-2025 Ray Martone
π Install missionlog today and make logging clean, structured, and powerful!
FAQs
π lightweight TypeScript abstract logger β’ level based filtering and optional tagging β’ supports both ESM & CJS
The npm package missionlog receives a total of 9,253 weekly downloads. As such, missionlog popularity was classified as popular.
We found that missionlog 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.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.