fix(log): output version to log for debugging purpose (#1163)

This commit is contained in:
Kota Kanbe
2021-02-04 07:47:56 +09:00
committed by GitHub
parent 64a6222bf9
commit 290edffccf
7 changed files with 33 additions and 31 deletions

View File

@@ -86,8 +86,9 @@ func NewCustomLogger(server config.ServerInfo) *logrus.Entry {
}
}
fields := logrus.Fields{"prefix": whereami}
return log.WithFields(fields)
entry := log.WithFields(logrus.Fields{"prefix": whereami})
entry.Infof("vuls-%s-%s", config.Version, config.Revision)
return entry
}
// GetDefaultLogDir returns default log directory