
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
send-logentries
Advanced tools
Send logs to logentries with a name instead of token and expose a basic functions to use with your logs.
Send logs to logentries with a name instead of token and expose a basic functions to use with your logs.
npm install send-logentries --save
The basic use to add to your application:
var sl = require('send-logentries'),
log = sl.init('app-test', sl.setSettings('path/to/file.json');
The log variable should have the same as logentries module when you put the token.
When you run your application, you need to create a json file with an object with tuples of name/token:
{
"default":
{
"token": "<token_value>"
},
"name":
{
"token": "<token_value>"
}
}
And set the path of that file to the init function.
If you like, you can use other basic functions to use in your code.
With express:
var express = require('express');
var app = express();
app.use(responseTime());
responseTime() function should use before other routes or put in the position that you desire to measure. This function send logs automatically to logentries with the format:
{
route: req.route.path,
host: req.headers.host,
statusCode: res.statusCode,
TotalTime: time,
unit: 'ms'
}
If you need to treat or process other information, its possible to pass a callback function and receive the time elapsed for a concrete request:
app.use(sl.responseTime(function (time) {
console.log('TIME: ', time);
console.log({ Time: time, unit: 'ms' });
log.info( { Time: time, unit: 'ms' } );
}));
You can also measure time for your async functions:
var idTimeStamp = sl.start();
setTimeout(function() {
var elapsedNano = sl.end(idTimeStamp);
var elapsedMilli = elapsedNano / 1000000; // divide by a million to get nano to milli
console.log('Time(ms): ', elapsedMilli);
log.info( { Time: elapsedMilli, unit: 'ms' } );
}, 5000);
npm test
TODO
FAQs
Send logs to logentries with a name instead of token and expose a basic functions to use with your logs.
We found that send-logentries 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
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.