
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
logify-alert
Advanced tools
A Node.js client for reporting exceptions to Logify Alert.
$ npm install logify-alert --save
const logifyAlert = require('logify-alert');
let client = new logifyAlert('SPECIFY_YOUR_API_KEY_HERE');
client.startHandling();
Specifies the application name. This name is shown in generated reports.
client.applicationName = 'My Application';
Specifies the application version. This version is shown in generated reports.
client.applicationVersion = '1.0.1';
A dictionary that contains custom data sent with a generated report. The first key can only consists of a-z, A-Z, 0-9, and _ characters.
client.customData = {FIRST_KEY: "FIRST DATA", SECOND_KEY: "SECOND DATA"};
A dictionary that contains tags specifying additional fields from a raw report, which will be used in auto ignoring, filtering or detecting duplicates. A key is a tag name (a string that consists of a-z, A-Z, 0-9, and _ characters), and a value is a tag value that is saved to a report. A new tag is added with Allow search enabled.
client.tags["OS"] = "Win8";
Specifies a unique user identifier that corresponds to a sent report.
client.userId = 'unique user id';
Logify Alert allows you to automatically listen to uncaught exceptions and deliver crash reports. For this purpose, use the methods below.
Commands Logify Alert to start listening to uncaught exceptions and rejections and send reports for all processed exceptions.
client.startHandling();
Commands Logify Alert to stop listening to uncaught exceptions and rejections.
client.stopHandling();
Alternatively, Logify Alert allows you to catch required exceptions manually, generate reports based on caught exceptions and send these reports only. For this purpose, use the methods below.
Sends information about the caught exception to the Logify Alert server.
client.sendException(error);
Sends information about the caught rejection to the Logify Alert server.
client.sendRejection(reason);
Specifies a delegate to be called after sending exceptions and rejections to the Logify Alert server.
The error parameter holds an error text that indicates the report sending result. The undefined value specifies that the crash report has been successfully sent. The "The report was not sent" value specifies that the crash report has not been sent.
client.afterReportException = function (error) {
if (error == undefined) {
// The report has been successfully sent
}
if (error == "The report was not sent") {
// The report has not been sent
}
}
Specifies a delegate to be called before sending exceptions and rejections to the Logify Alert server.
The customData parameter holds custom data sent along with an exception or a rejection. The default value is undefined. If you change a parameter value within a callback, a new value will be stored and passed to a callback the next time you call it in your application.
client.beforeReportException = function (customData) {
if (customData == undefined) {
customData = {};
}
customData["test key"] = "test value";
return customData;
}
If the described client is not suitable for you, you can create a custom one. For more information, refer to the Custom Clients document.
FAQs
Node.js client for Logify Alert
We found that logify-alert 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
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.