
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
stentor-logger
Advanced tools
Simple logging library with optional Winston support for 📣 stentor.
By default, stentor-logger provides a console-based fallback logger. If you want enhanced logging features, you can optionally install and register Winston.
import { log } from "stentor-logger";
log().debug("Hello");
log().debug({foo:true});
log().info("Payload %o", request);
log().warn("uh oh");
log().error(new Error("bar"));
To use Winston features, first install Winston:
npm install winston logform
Then stentor-logger will automatically detect and use Winston if available. You can also manually register a Winston logger:
import { registerWinstonLogger } from "stentor-logger";
import { createLogger, format, transports } from "winston";
const customWinstonLogger = createLogger({
level: "info",
format: format.json(),
transports: [
new transports.File({ filename: "error.log", level: "error" }),
new transports.File({ filename: "combined.log" })
]
});
registerWinstonLogger(customWinstonLogger);
You can configure the loggers behavior with the following environment variables:
STENTOR_LOG_LEVEL="debug"
Or "info", "warn", or "error".
STENTOR_LOG_PII="true"
To log PII, by default all detected PII is redacted.
STENTOR_LOG_PII_MASK_PARTIAL="true"
When set to true, it will mask a majority of the PII but leave some characters unmasked. For example: (123) 456 7890 goes to (###) ### 7890. By default, all characters are masked.
STENTOR_LOG_PII_ERRORS="true"
Only used by 📣 stentor developers to help debug errors while attempting to redact PII.
FAQs
Simple logging library with optional Winston support for 📣 stentor
The npm package stentor-logger receives a total of 1,215 weekly downloads. As such, stentor-logger popularity was classified as popular.
We found that stentor-logger 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.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.