Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
bunyan-logger
Advanced tools
Readme
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.
The npm package bunyan-logger receives a total of 52 weekly downloads. As such, bunyan-logger popularity was classified as not popular.
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.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.