File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ record (see below).
43
43
* [ Recommended/Best Practice Fields] ( #recommendedbest-practice-fields )
44
44
* [ Other fields to consider] ( #other-fields-to-consider )
45
45
- [ Streams] ( #streams )
46
+ * [ Adding a Stream] ( #adding-a-stream )
46
47
* [ stream errors] ( #stream-errors )
47
48
* [ stream type: ` stream ` ] ( #stream-type-stream )
48
49
* [ stream type: ` file ` ] ( #stream-type-file )
@@ -740,6 +741,20 @@ on log records).
740
741
If neither "streams" nor "stream" are specified, the default is a stream of
741
742
type "stream" emitting to `process.stdout` at the "info" level.
742
743
744
+ ## Adding a Stream
745
+
746
+ After a bunyan instance has been initialized, you may add additional streams by
747
+ calling the `addStream` function.
748
+
749
+ ```js
750
+ var bunyan = require(' bunyan' );
751
+ var log = bunyan.createLogger(' myLogger' );
752
+ log.addStream({
753
+ name: "myNewStream",
754
+ stream: process.stderr,
755
+ level: "debug"
756
+ });
757
+ ```
743
758
744
759
## stream errors
745
760
You can’t perform that action at this time.
0 commit comments