Skip to content

Commit

Permalink
update readme.md file
Browse files Browse the repository at this point in the history
Added information about buffer support and making buffer size and retriesInMilliSeconds configurable in library.
  • Loading branch information
Shwetajain148 authored Feb 6, 2017
1 parent 6c91cb5 commit 77b183f
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,20 @@ A client implementation for Loggly in node.js. Check out Loggly's [Node logging
winston.add(winston.transports.Loggly, options);
```


## Buffer Support

This library has buffer support during temporary network outage. User can configure size of buffer (no. of logs to be stored during network outage).

Add these below configuration in code snippet to override the default values of buffer option __size__ and __retriesInMilliSeconds__.
``` js
bufferOptions: {
size: 1000,
retriesInMilliSeconds: 60 * 1000
}
```
* __Note:__ The default value of buffer size and retries in milliseconds are 500 and 30000 (30 seconds) respectively.

The Loggly transport is based on [Nodejitsu's][2] [node-loggly][3] implementation of the [Loggly][0] API. If you haven't heard of Loggly before, you should probably read their [value proposition][4]. The Loggly transport takes the following options. Either 'inputToken' or 'inputName' is required:

* __level:__ Level of messages that this transport should log.
Expand All @@ -34,7 +48,9 @@ The Loggly transport is based on [Nodejitsu's][2] [node-loggly][3] implementatio
* __tags:__ An array of tags to send to loggly.
* __isBulk:__ If true, sends messages using bulk url
* __stripColors:__ Strip color codes from the logs before sending

* __bufferOptions:__ Buffer options has two configurations.
- __size:__ Number of logs to be buffered.
- __retriesInMilliSeconds:__ Time in milliseconds to retry sending buffered logs.

*Metadata:* Logged in suggested [Loggly format][5]

Expand Down Expand Up @@ -92,4 +108,4 @@ Once you have valid configuration and credentials you can run tests with [npm][7
[4]: http://www.loggly.com/product/
[5]: http://www.loggly.com/docs/automated-parsing/
[6]: http://vowsjs.org
[7]: http://npmjs.org
[7]: http://npmjs.org

0 comments on commit 77b183f

Please sign in to comment.