@@ -10,21 +10,34 @@ There’s a separate client intended for use in the browser, called
1010[ r7insight_js] ( https://github.com/rapid7/r7insight_js ) , which uses http and is optimized
1111for browser-specific logging needs.
1212
13- <!-- MarkdownTOC autolink=true bracket=round -->
14-
15- - [ Start] ( #start )
16- - [ Development] ( #development )
17- - [ Options] ( #options )
18- - [ Log Levels] ( #log-levels )
19- - [ Events] ( #events )
20- - [ Log Entries] ( #log-entries )
21- - [ Methods] ( #methods )
22- - [ Buffer & Connection Issues] ( #buffer--connection-issues )
23- - [ Using as a Winston ‘Transport’] ( #using-as-a-winston-transport )
24- - [ Using with Bunyan] ( #using-with-bunyan )
25- - [ Using with Ts.ED Logger] ( #using-with-ts-ed-logger )
26-
27- <!-- /MarkdownTOC -->
13+ - [ r7insight_node: Insight Platform Client] ( #r7insight_node-insight-platform-client )
14+ - [ Start] ( #start )
15+ - [ Development] ( #development )
16+ - [ Options] ( #options )
17+ - [ Required] ( #required )
18+ - [ Behavior] ( #behavior )
19+ - [ Log Processing Options`] ( #log-processing-options )
20+ - [ Other] ( #other )
21+ - [ Log Levels] ( #log-levels )
22+ - [ Events] ( #events )
23+ - [ Logger Events] ( #logger-events )
24+ - [ ` 'error' ` ] ( #error )
25+ - [ ` 'log' ` ] ( #log )
26+ - [ ` 'connected' ` and ` 'disconnected' ` and ` 'timed out' ` ] ( #connected-and-disconnected-and-timed-out )
27+ - [ ` 'drain' ` , ` 'finish' ` , ` 'pipe' ` , and ` 'unpipe' ` ] ( #drain-finish-pipe-and-unpipe )
28+ - [ ` 'buffer drain' ` ] ( #buffer-drain )
29+ - [ RingBuffer Events] ( #ringbuffer-events )
30+ - [ ` 'buffer shift' ` ] ( #buffer-shift )
31+ - [ Log Entries] ( #log-entries )
32+ - [ Object Serialization] ( #object-serialization )
33+ - [ Optional Augmentation] ( #optional-augmentation )
34+ - [ Flattening Log Objects] ( #flattening-log-objects )
35+ - [ Methods] ( #methods )
36+ - [ Buffering] ( #buffering )
37+ - [ Connection Handling] ( #connection-handling )
38+ - [ Using as a Winston ‘Transport’] ( #using-as-a-winston-transport )
39+ - [ Pre-requisites] ( #pre-requisites )
40+ - [ Using with Bunyan] ( #using-with-bunyan )
2841
2942## Start
3043
@@ -318,8 +331,15 @@ some other means with which a token can be tested for validity.
318331
319332# # Using as a Winston ‘Transport’
320333
321- If Winston is included in your package.json dependencies, simply requiring the
322- Insight client will place the transport constructor at ` winston.transports` ,
334+ # ## Pre-requisites
335+
336+ - ` winston` and ` winston-transport` installed
337+ * Check [package.json](./package.json) for currently supported version
338+
339+ If Winston is included in your package.json dependencies, you can just require the Insight Logger
340+ to initialize it.
341+
342+ The Insight client will place the transport constructor at ` winston.transports` ,
323343even if Winston itself hasn’t yet been required.
324344
325345` ` ` javascript
@@ -329,6 +349,9 @@ const winston = require('winston');
329349assert(winston.transports.Insight);
330350` ` `
331351
352+ Winston is an optional dependency in ` r7insight_node` and and if included it
353+ requires ` winston-transport` for the ` InsightTransport` to extend it.
354+
332355When adding a new Insight transport, the options argument passed to Winston’s
333356` add` method supports the usual options in addition to those which are Winston-
334357specific. If custom levels are not provided, Winston’s defaults will be used.
0 commit comments