From 2946fbdea34696bab783221198fa10a8fd3a9093 Mon Sep 17 00:00:00 2001 From: Yilun Date: Sat, 17 Apr 2021 18:12:33 -0700 Subject: [PATCH] Init log module in nknc to prevent panic Signed-off-by: Yilun --- cmd/nknc/nknc.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/nknc/nknc.go b/cmd/nknc/nknc.go index 43d65233a..e24ad0f0a 100644 --- a/cmd/nknc/nknc.go +++ b/cmd/nknc/nknc.go @@ -27,6 +27,11 @@ func init() { } func main() { + err := log.Init() + if err != nil { + log.Fatal(err) + } + defer func() { if r := recover(); r != nil { log.Fatalf("Panic: %+v", r)