@@ -90,7 +90,6 @@ forever.load = function (options) {
90
90
] ;
91
91
}
92
92
93
-
94
93
forever . config . set ( 'root' , options . root ) ;
95
94
forever . config . set ( 'pidPath' , options . pidPath ) ;
96
95
forever . config . set ( 'sockPath' , options . sockPath ) ;
@@ -138,10 +137,15 @@ forever.load = function (options) {
138
137
// Sets up debugging for this forever process
139
138
//
140
139
forever . _debug = function ( ) {
141
- forever . config . set ( 'debug' , true ) ;
142
- forever . log . add ( winston . transports . File , {
143
- filename : path . join ( forever . config . get ( 'root' ) , 'forever.debug.log' )
144
- } ) ;
140
+ var debug = forever . config . get ( 'debug' ) ;
141
+
142
+ if ( ! debug ) {
143
+ forever . config . set ( 'debug' , true ) ;
144
+ forever . log . add ( winston . transports . File , {
145
+ level : 'silly' ,
146
+ filename : path . join ( forever . config . get ( 'root' ) , 'forever.debug.log' )
147
+ } ) ;
148
+ }
145
149
}
146
150
147
151
//
@@ -329,7 +333,7 @@ forever.restart = function (target, format) {
329
333
var restartCommand = [
330
334
'forever' ,
331
335
'start' ,
332
- '-d ' , proc . sourceDir ,
336
+ '--sourceDir ' , proc . sourceDir ,
333
337
'-l' , proc . logFile ,
334
338
'--append'
335
339
] ;
@@ -347,6 +351,8 @@ forever.restart = function (target, format) {
347
351
}
348
352
349
353
restartCommand . push ( proc . file , proc . options . join ( ' ' ) ) ;
354
+ forever . log . silly ( 'Restarting with options' , { options : restartCommand . join ( ' ' ) } ) ;
355
+
350
356
exec ( restartCommand . join ( ' ' ) , function ( err , stdout , stderr ) {
351
357
next ( ) ;
352
358
} ) ;
0 commit comments