diff --git a/cli/main.go b/cli/main.go index 01424f6b..8c03ec6e 100644 --- a/cli/main.go +++ b/cli/main.go @@ -38,6 +38,7 @@ var ( logJSON = flag.Bool("json", defaultLogJSON, "log in JSON format instead of text") logLevel = flag.String("loglevel", defaultLogLevel, "minimum loglevel: trace, debug, info, warn/warning, error, fatal, panic") logDebug = flag.Bool("debug", false, "shorthand for '-loglevel debug'") + logService = flag.String("log-service", "", "add a 'service=...' tag to all log messages") listenAddr = flag.String("addr", defaultListenAddr, "listen-address for mev-boost server") relayURLs = flag.String("relays", "", "relay urls - single entry or comma-separated list (scheme://pubkey@host)") @@ -86,6 +87,9 @@ func Main() { } logrus.SetLevel(lvl) } + if *logService != "" { + log = log.WithField("service", *logService) + } log.Infof("mev-boost %s", config.Version) log.Debug("debug logging enabled")