Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@baileyherbert/logging
Advanced tools
This package offers a logging solution based on a modular delivery concept. Simply create a logger instance, attach a delivery transport (such as console, file, or your own), and start logging!
npm install @baileyherbert/logging
Create a logger instance. This is what we'll use to actually write output.
const logger = new Logger();
Create a console transport. This will print our output to the console. You can define a minimum log level for output.
We'll use Trace
here which will capture all levels of output.
logger.createConsoleTransport(LogLevel.Trace);
Create a file transport. This will send our output into a file. We'll set a minimum log level of Information
to keep
the logs minimal. Please note that the file transport has automatic log rotation enabled by default, but you can
customize or disable this behavior.
logger.createFileTransport(LogLevel.Information, {
fileName: 'logs/output.log'
});
Done! Now use the logger to write output to both the console and log file at once.
logger.trace('Starting example program');
logger.info('Hello world');
Both of those transports have many customization options, and you can also create your own. Check the transports guide to learn more.
FAQs
Just another logging solution.
The npm package @baileyherbert/logging receives a total of 8 weekly downloads. As such, @baileyherbert/logging popularity was classified as not popular.
We found that @baileyherbert/logging 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.