storj/cmd/storagenode-updater/main.go
Clement Sam e9611801ad cmd/{storagenode,storagenode-updater}: add Process name to logs
Now that we have both the storagenode and updater processes running
in a single docker container, we need a way to know which log entry
is logged by any of the processes.

This change includes a Process field in the log entries.

Resolves https://github.com/storj/storj/issues/4648

Change-Id: I167b9ab65728a41136d264b5fe2c41bb64ed1785
2022-04-12 16:49:56 +00:00

22 lines
418 B
Go

// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
//go:build !windows
// +build !windows
package main
import (
"go.uber.org/zap"
"storj.io/private/process"
)
func main() {
loggerFunc := func(logger *zap.Logger) *zap.Logger {
return logger.With(zap.String("Process", updaterServiceName))
}
process.ExecWithCustomConfigAndLogger(rootCmd, true, process.LoadConfig, loggerFunc)
}