Skip to content

Commit 7ef57fc

Browse files
committed
fix logging
1 parent d2220c1 commit 7ef57fc

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

Service/system-service_windows.go

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -226,13 +226,18 @@ func (thisRef *WindowsService) Stop() error {
226226
})
227227

228228
if thisRef.command.OnStopDelegate != nil {
229+
logging.Instance().LogDebugWithFields(loggingC.Fields{
230+
"method": helpersReflect.GetThisFuncName(),
231+
"message": fmt.Sprintf("%s: OnStopDelegate calling: %s", logTag, thisRef.command.Name),
232+
})
233+
229234
thisRef.command.OnStopDelegate()
230-
}
231235

232-
logging.Instance().LogDebugWithFields(loggingC.Fields{
233-
"method": helpersReflect.GetThisFuncName(),
234-
"message": fmt.Sprintf("%s: OnStopDelegate called: %s", logTag, thisRef.command.Name),
235-
})
236+
logging.Instance().LogDebugWithFields(loggingC.Fields{
237+
"method": helpersReflect.GetThisFuncName(),
238+
"message": fmt.Sprintf("%s: OnStopDelegate called: %s", logTag, thisRef.command.Name),
239+
})
240+
}
236241

237242
err := thisRef.control(svc.Stop, svc.Stopped)
238243
if err != nil {

0 commit comments

Comments
 (0)