mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-15 00:04:46 +08:00
优化异常捕获日志
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user