fix(log): add .log extension to vuls logfile (#910)

This commit is contained in:
Kota Kanbe
2019-09-18 23:21:06 +09:00
committed by GitHub
parent 76363c227b
commit b2e429ccc6
2 changed files with 3 additions and 2 deletions

View File

@@ -17,7 +17,7 @@ import (
)
// Version of Vuls
var Version = "0.7.0"
var Version = "0.9.0"
// Revision of Git
var Revision string

View File

@@ -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,