Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
app-logs-javascript
Advanced tools
The app-logs-javascript package is a JavaScript client for the App-Logs error-tracking app. It provides a simple and easy-to-use API for logging errors and tracking their status.
There are many benefits to using app-logs-javascript, including:
To install the app-logs-javascript package, run the following command:
npm install app-logs-javascript
or
yarn add app-logs-javascript
Once the package is installed, you can import the init function and initialize the client into your JavaScript code as follows:
import AppLogs from 'app-logs-javascript';
// initialization (calling this function one time is enough)
AppLogs.init({ drainUrl: 'YOUR_DRAIN_URL_FROM_THE_APP_SETTING' });
To log an error or any data, simply call the logEvent()
method:
import AppLogs from 'app-logs-javascript';
// data
const transferData = { txId: 2023, label: 'test payment' }
// log the event
AppLogs.logEvent({
level: "info",
data: transferData
});
To catch an exception, simply call the captureException()
method in the catch block as follows:
import AppLogs from 'app-logs-javascript';
try {
// your logic here
} catch(error) {
// log the exception
AppLogs.captureException(error, {
userId: 'usr2023',
operation: 'registration process'
});
}
We welcome contributions to the app-logs-javascript package. If you find a bug or have a suggestion for improvement, please create an issue on GitHub.
The app-logs-javascript package is licensed under the MIT License.
FAQs
Javascript SDK for app-logs error tracker
The npm package app-logs-javascript receives a total of 0 weekly downloads. As such, app-logs-javascript popularity was classified as not popular.
We found that app-logs-javascript demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
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.