Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
book-loggly
Advanced tools
Readme
loggly middleware for the book logging framework.
This middleware is shamelessly copy/modified from book-raven.
npm install book book-loggly --save
var log = require('book').default();
var logglyClient = require('loggly').createClient(myLogglyConfig);
var bookLogglyOptions = {
// A custom book-loggly option to ignore logs at ignore_levels and above
// 0: panic, 1: error, 2: warning, 3: info, 4: debug (default), 5: trace
"ignore_levels": log.TRACE,
// An (optional) arbitrary object to add to the log event to notify where its coming from
"from": {
"instance-id": "123"
}
};
log.use(require('book-loggly')(logglyClient, bookLogglyOptions));
// Now just log as usual
log.warn("Hey there!")
log.info("Logging this object", {some: 'object'})
log.error(new Error("test error!"))
book-loggly
uses the loggly JSON capability to log objects. The general form of these objects is:
{
"isError": false,
"message": "message",
"level_code": 3,
"level": "warning",
"extra": {
"extra_parameters": "that were added by other middleware",
"object fields": "from objects passed into the log function"
},
"from": {
"static-information": "from options.from"
}
}
If there is an error sending the packet to loggly, an error will be thrown. To catch it, use uncaughtException
. You can do anything here, but perhaps you want to exit.
process.on('uncaughtException', function(err) {
log.panic(err);
setTimeout(process.exit.bind(process, 1), 1500);
})
See LICENSE file.
FAQs
loggly middleware for the book logging framework
The npm package book-loggly receives a total of 7 weekly downloads. As such, book-loggly popularity was classified as not popular.
We found that book-loggly demonstrated a not healthy version release cadence and project activity because the last version was released 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.