File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -18,13 +18,6 @@ const TransportStream = require('winston-transport');
18
18
* @extends {TransportStream }
19
19
*/
20
20
module . exports = class Console extends TransportStream {
21
- // Keep a reference to the log, warn, and error console methods
22
- // in case they get redirected to this transport after the logger is
23
- // instantiated. This prevents a circular reference issue.
24
- _consoleLog = console . log . bind ( console ) ;
25
- _consoleWarn = console . warn . bind ( console ) ;
26
- _consoleError = console . error . bind ( console ) ;
27
-
28
21
/**
29
22
* Constructor function for the Console transport object responsible for
30
23
* persisting log messages and metadata to a terminal or TTY.
@@ -40,6 +33,13 @@ module.exports = class Console extends TransportStream {
40
33
this . eol = typeof options . eol === 'string' ? options . eol : os . EOL ;
41
34
this . forceConsole = options . forceConsole || false ;
42
35
36
+ // Keep a reference to the log, warn, and error console methods
37
+ // in case they get redirected to this transport after the logger is
38
+ // instantiated. This prevents a circular reference issue.
39
+ this . _consoleLog = console . log . bind ( console ) ;
40
+ this . _consoleWarn = console . warn . bind ( console ) ;
41
+ this . _consoleError = console . error . bind ( console ) ;
42
+
43
43
this . setMaxListeners ( 30 ) ;
44
44
}
45
45
You can’t perform that action at this time.
0 commit comments