Adding structuredLogging check and fix inconsistencies (#13370)

* Adding structuredLogging check and fix inconsistencies

* Addressing PR review comments

* Addressing PR review comments

* Addressing PR review comments

* Addressing PR review comments

* Addressing PR review comments
Этот коммит содержится в:
Jesús Espino
2019-12-16 13:57:21 +01:00
коммит произвёл GitHub
родитель fd0a3a687d
Коммит b8ef62e502
10 изменённых файлов: 43 добавлений и 21 удалений

Просмотреть файл

@@ -215,8 +215,20 @@ func NewServer(options ...Option) (*Server, error) {
}
})
mlog.Info(fmt.Sprintf("Current version is %v (%v/%v/%v/%v)", model.CurrentVersion, model.BuildNumber, model.BuildDate, model.BuildHash, model.BuildHashEnterprise))
mlog.Info(fmt.Sprintf("Enterprise Enabled: %v", model.BuildEnterpriseReady))
logCurrentVersion := fmt.Sprintf("Current version is %v (%v/%v/%v/%v)", model.CurrentVersion, model.BuildNumber, model.BuildDate, model.BuildHash, model.BuildHashEnterprise)
mlog.Info(
logCurrentVersion,
mlog.String("current_version", model.CurrentVersion),
mlog.String("build_number", model.BuildNumber),
mlog.String("build_date", model.BuildDate),
mlog.String("build_hash", model.BuildHash),
mlog.String("build_hash_enterprise", model.BuildHashEnterprise),
)
if model.BuildEnterpriseReady == "true" {
mlog.Info("Enterprise Build", mlog.Bool("enterprise_build", true))
} else {
mlog.Info("Team Edition Build", mlog.Bool("enterprise_build", false))
}
pwd, _ := os.Getwd()
mlog.Info("Printing current working", mlog.String("directory", pwd))
@@ -505,7 +517,8 @@ func (s *Server) Start() error {
}
s.ListenAddr = listener.Addr().(*net.TCPAddr)
mlog.Info(fmt.Sprintf("Server is listening on %v", listener.Addr().String()))
logListeningPort := fmt.Sprintf("Server is listening on %v", listener.Addr().String())
mlog.Info(logListeningPort, mlog.String("address", listener.Addr().String()))
// Migration from old let's encrypt library
if *s.Config().ServiceSettings.UseLetsEncrypt {