From b2e429ccc6c9dfb0c266b6e746368be3bd755046 Mon Sep 17 00:00:00 2001 From: Kota Kanbe Date: Wed, 18 Sep 2019 23:21:06 +0900 Subject: [PATCH] fix(log): add .log extension to vuls logfile (#910) --- config/config.go | 2 +- util/logutil.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config/config.go b/config/config.go index 54798e65..33c6c8f7 100644 --- a/config/config.go +++ b/config/config.go @@ -17,7 +17,7 @@ import ( ) // Version of Vuls -var Version = "0.7.0" +var Version = "0.9.0" // Revision of Git var Revision string diff --git a/util/logutil.go b/util/logutil.go index 553c2252..f9f3f386 100644 --- a/util/logutil.go +++ b/util/logutil.go @@ -1,6 +1,7 @@ package util import ( + "fmt" "io/ioutil" "os" "path/filepath" @@ -62,7 +63,7 @@ func NewCustomLogger(c config.ServerInfo) *logrus.Entry { } if _, err := os.Stat(logDir); err == nil { - path := filepath.Join(logDir, whereami) + path := filepath.Join(logDir, fmt.Sprintf("%s.log", whereami)) log.Hooks.Add(lfshook.NewHook(lfshook.PathMap{ logrus.DebugLevel: path, logrus.InfoLevel: path,