优化异常捕获日志

This commit is contained in:
boyce
2019-03-25 18:12:29 +08:00
parent 738bf3d5b8
commit a74c45c248
6 changed files with 21 additions and 31 deletions

View File

@@ -4,6 +4,8 @@ import (
"fmt"
"log"
"github.com/duanhf2012/origin/util"
"net/http"
_ "net/http/pprof"
"os"
@@ -37,6 +39,7 @@ func (s *COriginNode) Init() {
os.Exit(-1)
}
util.Log = logger.Printf
s.sigs = make(chan os.Signal, 1)
signal.Notify(s.sigs, syscall.SIGINT, syscall.SIGTERM)
}