@@ -31,7 +31,6 @@ var Monitor = exports.Monitor = function (script, options) {
31
31
// can be attached through `monitor.use(plugin, options)`.
32
32
//
33
33
function bootstrap ( monitor ) {
34
- forever . plugins . logger . attach . call ( monitor , options ) ;
35
34
36
35
if ( options . watch ) {
37
36
forever . plugins . watch . attach . call ( monitor , options ) ;
@@ -53,22 +52,14 @@ var Monitor = exports.Monitor = function (script, options) {
53
52
this . childExists = false ;
54
53
this . checkFile = options . checkFile !== false ;
55
54
this . times = 0 ;
55
+ this . daemon = options . daemon || false ;
56
56
57
57
//
58
58
// Setup log files and logger for this instance.
59
59
//
60
60
this . logFile = options . logFile || path . join ( forever . config . get ( 'root' ) , this . uid + '.log' ) ;
61
61
this . outFile = options . outFile ;
62
62
this . errFile = options . errFile ;
63
- this . logger = options . logger || new ( winston . Logger ) ( {
64
- transports : [ new winston . transports . Console ( { silent : this . silent } ) ]
65
- } ) ;
66
-
67
- //
68
- // Extend from the winston logger.
69
- //
70
- this . logger . extend ( this ) ;
71
- this . log = fs . createWriteStream ( this . logFile , { flags : 'a+' , encoding : 'utf8' , mode : '0666' } ) ;
72
63
73
64
//
74
65
// Setup restart timing. These options control how quickly forever restarts
@@ -153,6 +144,11 @@ Monitor.prototype.start = function (restart) {
153
144
return this ;
154
145
}
155
146
147
+ if ( ! this . silent ) {
148
+ child . stdout . pipe ( process . stdout ) ;
149
+ child . stderr . pipe ( process . stderr ) ;
150
+ }
151
+
156
152
this . ctime = Date . now ( ) ;
157
153
this . child = child ;
158
154
this . running = true ;
0 commit comments