
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
bunyan-logger
Advanced tools
Extend Bunyan to have default options and predefined streams etc.
npm install bunyan-logger
const Logger = require('bunyan-logger');
const Logger = require('bunyan-logger');
const logger = new Logger({ stream: 'debug' });
logger.error(new Error('Lorem'));
const Logger = require('bunyan-logger');
const expressLogger = require('express-bunyan-logger');
app.use(expressLogger({
logger: new Logger({ stream: 'debug' })
}));
See bunyan-debug-stream.
// Simple.
const logger = new Logger({ stream: 'debug' });
// With options.
const logger = new Logger({
name: 'myLog',
stream: {
name: 'debug',
basepath: path.resolve(__dirname, '../')
},
serializers: require('bunyan-debug-stream').serializers
});
// Simple.
const logger = new Logger({ stream: 'file' });
// With options.
const logger = new Logger({
name: 'myLog',
stream: {
name: 'file',
path: './some.log'
}
});
const logger = new Logger({ stream: 'ringbuffer' });
const logger = new Logger({ stream: 'stdout' });
// Simple.
const logger = new Logger({ stream: 'syslog' });
// With options.
const logger = new Logger({
name: 'myLog',
stream: {
name: 'syslog',
host: '10.0.0.1'
}
});
See /example
.
FAQs
Extend Bunyan to have default options and predefined streams etc.
We found that bunyan-logger demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.