Skip to content

Commit

Permalink
add a -log-service cli flag (flashbots#355)
Browse files Browse the repository at this point in the history
  • Loading branch information
metachris authored and screwyprof committed Feb 3, 2023
1 parent ed376da commit 21cf264
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)")
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 21cf264

Please sign in to comment.