File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 1
1
1.36.2 - 2016-mm-dd
2
2
-------------------
3
3
4
+ Bug fixes:
5
+ - Batch Queries logs: use path instead of stream to be able to reopen FD.
6
+
4
7
5
8
1.36.1 - 2016-09-30
6
9
-------------------
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
3
var bunyan = require ( 'bunyan' ) ;
4
- var fs = require ( 'fs' ) ;
5
4
6
5
function BatchLogger ( path ) {
6
+ var stream = {
7
+ level : 'info'
8
+ } ;
9
+ if ( path ) {
10
+ stream . path = path ;
11
+ } else {
12
+ stream . stream = process . stdout ;
13
+ }
7
14
this . path = path ;
8
15
this . logger = bunyan . createLogger ( {
9
16
name : 'batch-queries' ,
10
- streams : [ {
11
- level : 'info' ,
12
- stream : path ? fs . createWriteStream ( path , { flags : 'a' , encoding : 'utf8' } ) : process . stdout
13
- } ]
17
+ streams : [ stream ]
14
18
} ) ;
15
19
}
16
20
You can’t perform that action at this time.
0 commit comments