boxdd: Fix log format

This commit is contained in:
世界
2026-07-14 18:56:28 +08:00
parent 2fd577502c
commit 5aa778c40f
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -85,7 +85,7 @@ func (s *windowsService) Execute(arguments []string, requests <-chan svc.ChangeR
if request.Cmd == svc.Stop || request.Cmd == svc.Shutdown { if request.Cmd == svc.Stop || request.Cmd == svc.Shutdown {
break break
} }
serviceLogError(E.New("unexpected service command: ", request.Cmd)) serviceLogError(E.New("unexpected service command: ", uint32(request.Cmd)))
} }
statuses <- svc.Status{State: svc.StopPending} statuses <- svc.Status{State: svc.StopPending}
watchdog := time.AfterFunc(3*time.Second, func() { watchdog := time.AfterFunc(3*time.Second, func() {
+3 -3
View File
@@ -271,7 +271,7 @@ func stopServiceAndWait(service *mgr.Service) error {
} }
func waitServiceState(service *mgr.Service, state svc.State) error { func waitServiceState(service *mgr.Service, state svc.State) error {
timeout := time.Now().Add(10 * time.Second) timeout := time.Now().Add(30 * time.Second)
var currentStatus svc.Status var currentStatus svc.Status
for time.Now().Before(timeout) { for time.Now().Before(timeout) {
status, err := service.Query() status, err := service.Query()
@@ -291,8 +291,8 @@ func waitServiceState(service *mgr.Service, state svc.State) error {
time.Sleep(500 * time.Millisecond) time.Sleep(500 * time.Millisecond)
} }
return E.New( return E.New(
"timeout waiting for service state ", state, "timeout waiting for service state ", uint32(state),
", current state ", currentStatus.State, ", current state ", uint32(currentStatus.State),
", process ID ", currentStatus.ProcessId, ", process ID ", currentStatus.ProcessId,
", Windows exit code ", currentStatus.Win32ExitCode, ", Windows exit code ", currentStatus.Win32ExitCode,
", service exit code ", currentStatus.ServiceSpecificExitCode, ", service exit code ", currentStatus.ServiceSpecificExitCode,