Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
@gojob/winston-bugsnag
Advanced tools
Winston Transporter for Bugsnag. Based on Niftylettuce's work (Nick Baugh).
The maintained and well-documented Bugsnag transport for the winston logger.
Full API documentation is available at: https://docs.bugsnag.com/api/error-reporting/
npm install --save winston winston-bugsnag-logger
You can configure winston-bugsnag-logger
in two different ways.
With new winston.Logger
:
const winston = require('winston');
const Bugsnag = require('winston-bugsnag-logger');
const options = {
apiKey: '*******',
level: 'info'
};
const logger = new winston.Logger({
transports: [
new Bugsnag(options)
]
});
Or with winston's add
method:
const winston = require('winston');
const Bugsnag = require('winston-bugsnag-logger');
const logger = new winston.Logger();
logger.add(Bugsnag, options);
See Options below for custom configuration.
options
)Per options
variable above, here are the default options provided:
Default options:
apiKey
(String) - your Bugsnag API key (defaults to process.env.BUGSNAG_API_KEY
)config
(Object) - a Bugsnag configuration objectbugsnag
(Object) - an optional instance of bugsnag
that is already configured via bugsnag.register
(if provided this will be used instead of the config
option)Transport related options:
name
(String) - transport's name (defaults to bugsnag
)silent
(Boolean) - suppress logging (defaults to false
)level
(String) - transport's level of messages to log (defaults to info
)levelsMap
(Object) - log level mapping to Bugsnag (see Log Level Mapping below)Winston logging levels are mapped by default to Bugsnag's acceptable levels.
These defaults are set as `options.levelsMap' and are:
{
silly: 'info',
verbose: 'info',
info: 'info',
debug: 'debug',
warn: 'warning',
error: 'error'
}
You can customize how log levels are mapped using the levelsMap
option:
new Bugsnag({
levelsMap: {
verbose: 'info'
}
});
If no log level mapping was found for the given level
passed, then it will not log anything.
FAQs
Winston Transporter for Bugsnag. Based on Niftylettuce's work (Nick Baugh).
We found that @gojob/winston-bugsnag 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
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.