logzio-nodejs
Advanced tools
Comparing version 0.4.2 to 0.4.3
@@ -154,5 +154,7 @@ var request = require('request'); | ||
var now = (new Date()).toISOString(); | ||
msg['@timestamp'] = now; | ||
if (this.addTimestampWithNanoSecs) { | ||
var time = process.hrtime(); | ||
var now = (new Date()).toISOString(); | ||
msg['@timestamp_nano'] = [now, time[0].toString(), time[1].toString()].join('-'); | ||
@@ -159,0 +161,0 @@ } |
{ | ||
"name": "logzio-nodejs", | ||
"description": "A nodejs implementation for sending logs to Logz.IO cloud service", | ||
"version": "0.4.2", | ||
"version": "0.4.3", | ||
"author": "Gilly Barr <gilly@logz.io>", | ||
"contributors": [ | ||
{ | ||
"name": "Gilly Barr", | ||
"email": "gillyb@gmail.com" | ||
}, | ||
{ | ||
"name": "Asaf Mesika", | ||
"email": "asaf.mesika@gmail.com" | ||
} | ||
], | ||
"contributors": [{ | ||
"name": "Gilly Barr", | ||
"email": "gillyb@gmail.com" | ||
}, { | ||
"name": "Asaf Mesika", | ||
"email": "asaf.mesika@gmail.com" | ||
}], | ||
"repository": { | ||
@@ -17,0 +14,0 @@ "type": "git", |
![Build Status](https://travis-ci.org/logzio/logzio-nodejs.svg?branch=master) | ||
# logzio-nodejs | ||
NodeJS logger for LogzIO. | ||
NodeJS logger for LogzIO. | ||
The logger stashes the log messages you send into an array which is sent as a bulk once it reaches its size limit (100 messages) or time limit (10 sec) in an async fashion. | ||
It contains a simple retry mechanism which upon connection reset (server side) or client timeout, wait a bit (default interval of 2 seconds), and try this bulk again (it does not block other messages from being accumulated and sent (async). The interval increases by a factor of 2 between each retry, until we reached the maximum allowed attempts (3). | ||
By default any error is logged to the console. This can be changed by supplying a callback function. | ||
@@ -23,4 +23,4 @@ | ||
// sending an object | ||
var obj = { | ||
message: 'Some log message', | ||
var obj = { | ||
message: 'Some log message', | ||
param1: 'val1', | ||
@@ -34,3 +34,3 @@ param2: 'val2' | ||
* **token** | ||
* **token** | ||
Mandatory. Your API logging token. Look it up in the Device Config tab in Logz.io | ||
@@ -57,3 +57,6 @@ * **type** - Log type. Help classify logs into different classifications | ||
## Update log | ||
## Update log | ||
**0.4.3** | ||
- Add the `@timestamp` field to the logs on the client's machine (and not when it reaches the server) | ||
**0.4.1** | ||
@@ -60,0 +63,0 @@ - Updated `request` dependency to 2.75.0 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38277
567
98