From 77b183f70cfdf90b10d733842506a9d1e79e1512 Mon Sep 17 00:00:00 2001 From: Shwetajain148 Date: Mon, 6 Feb 2017 18:35:36 +0530 Subject: [PATCH] update readme.md file Added information about buffer support and making buffer size and retriesInMilliSeconds configurable in library. --- README.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0b7f041..d7f5252 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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] @@ -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 \ No newline at end of file +[7]: http://npmjs.org