aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/service/service_manager.go
diff options
context:
space:
mode:
Diffstat (limited to 'service/service_manager.go')
-rw-r--r--service/service_manager.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/service/service_manager.go b/service/service_manager.go
index 58c2d863..5bd94e0e 100644
--- a/service/service_manager.go
+++ b/service/service_manager.go
@@ -7,10 +7,12 @@ package service
import (
"errors"
+ "fmt"
"log"
"os"
"runtime"
"runtime/debug"
+ "strings"
"sync"
"syscall"
"time"
@@ -47,7 +49,11 @@ func (service *managerService) Execute(args []string, r <-chan svc.ChangeRequest
}
defer func() {
if x := recover(); x != nil {
- log.Printf("%v:\n%s", x, string(debug.Stack()))
+ for _, line := range append([]string{fmt.Sprint(x)}, strings.Split(string(debug.Stack()), "\n")...) {
+ if len(strings.TrimSpace(line)) > 0 {
+ log.Println(line)
+ }
+ }
panic(x)
}
}()