Skip to content

Commit

Permalink
Merge pull request winstonjs#11 from Shwetajain148/update-readme
Browse files Browse the repository at this point in the history
update readme.md file
  • Loading branch information
mchaudhary authored Feb 7, 2017
2 parents e8c4ed2 + 77b183f commit 2908e2b
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 @@ -22,6 +22,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 @@ -33,7 +47,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 @@ -91,4 +107,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 2908e2b

Please sign in to comment.