diff --git a/cmd/s3-gw/app.go b/cmd/s3-gw/app.go index 3e3aa82..bbd2eca 100644 --- a/cmd/s3-gw/app.go +++ b/cmd/s3-gw/app.go @@ -189,8 +189,15 @@ func newApp(ctx context.Context, l *zap.Logger, v *viper.Viper) *App { } // Wait waits for application to finish. +// +// Pre-logs a message about the launch of the application mentioning its +// version (version.Version) and name (neofs-s3-gw). At the end writes to the +// log about the stop. func (a *App) Wait() { - a.log.Info("application started", zap.String("version", version.Version)) + a.log.Info("application started", + zap.String("name", "neofs-s3-gw"), + zap.String("version", version.Version), + ) <-a.webDone // wait for web-server to be stopped diff --git a/cmd/s3-gw/main.go b/cmd/s3-gw/main.go index 41f2e1a..bac6bb6 100644 --- a/cmd/s3-gw/main.go +++ b/cmd/s3-gw/main.go @@ -6,7 +6,6 @@ import ( "os/signal" "syscall" - "github.com/nspcc-dev/neofs-s3-gw/internal/version" "github.com/spf13/viper" "go.uber.org/zap" "go.uber.org/zap/zapcore" @@ -19,8 +18,6 @@ import ( // * parameterized level (debug by default) // * console encoding // * ISO8601 time encoding -// * app_name field set to neofs-s3-gw -// * app_version field set to version.Version // // Logger records a stack trace for all messages at or above fatal level. // @@ -55,10 +52,7 @@ func newLogger(v *viper.Viper) *zap.Logger { panic(fmt.Sprintf("build zap logger instance: %v", err)) } - return l.With( - zap.String("app_name", "neofs-s3-gw"), - zap.String("app_version", version.Version), - ) + return l } func main() {