
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.
@oxy2/console-logger
Advanced tools
Replaces console.log() with a contextual JSON logger.
This module only works in node, not the browser.
import { initLogger } from "@oxy2/console-logger";
// All console logs from now on will be JSON data with `level` and `time` properties
initLogger();
console.log({ x: 123 });
console.error({ error: "something happened" });
// => {"level":30,"time":1621043684459,"x":123}
// => {"level":50,"time":1621043684459,"error":"something happened"}
// Calling `addToLoggerContext()` will add data to all further logs in the current synchronous execution
import { addToLoggerContext } from "@oxy2/console-logger";
serverMiddleware((path) => addToLoggerContext({ path }));
onGet("/hello", () => console.log("Hello, world!"));
// => {"level":30,"time":1621043684459,"msg":"Hello, world!","path":"/hello"}
// Pass `useDevLogger` during development to print pretty logs
initLogger({ useDevLogger: true });
console.log("Hello, world!", { path: "/hello" });
// => (i) Hello, world! { path: "/hello" }
// Pass `useConsole` to avoid modifying the global console
import { logger } from "@oxy2/console-logger";
initLogger({ useConsole: false });
logger.info("Hello, world!", { path: "/hello" });
// => {"level":30,"time":1621043684459,"msg":"Hello, world!","path":"/hello"}
debug = 20info = 30warn = 40error = 50setTimeout(), http.createServer(), etc. You can read more about this on the node documentation.error) are printed to STDOUT when run in production mode.debug logs are ignored by the default logger implementation when run in production mode (nothing is printed to STDOUT).See CONTRIBUTING.md for instructions how to develop locally and make changes.
FAQs
Replaces console.log() with a contextual JSON logger.
We found that @oxy2/console-logger demonstrated a not healthy version release cadence and project activity because the last version was released 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.