send-logentries
Send logs to logentries with a name instead of token and expose a basic functions to use with your logs.
Installation
npm install send-logentries --save
Usage
The basic use to add to your application:
var sl = log = sl
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 = ; var app = ; app;
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: reqroutepath host: reqheadershost statusCode: resstatusCode 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;
You can also measure time for your async functions:
var idTimeStamp = slstart; ;
Tests
npm test
Contributing
TODO
Release History
- 0.0.1 Initial release