Commit c775ffbe authored by Conner Fromknecht's avatar Conner Fromknecht

fix: actually allow log level to be set via flags

This was a known bug, but recently caught the reason in combing through
the new copy in the specs repo. The old hack that auto defaulted to
debug has been removed.
parent a6006b2b
---
'@eth-optimism/batch-submitter-service': patch
---
fix BSS log-level flag parsing
...@@ -190,6 +190,7 @@ func NewConfig(ctx *cli.Context) (Config, error) { ...@@ -190,6 +190,7 @@ func NewConfig(ctx *cli.Context) (Config, error) {
SafeMinimumEtherBalance: ctx.GlobalUint64(flags.SafeMinimumEtherBalanceFlag.Name), SafeMinimumEtherBalance: ctx.GlobalUint64(flags.SafeMinimumEtherBalanceFlag.Name),
ClearPendingTxs: ctx.GlobalBool(flags.ClearPendingTxsFlag.Name), ClearPendingTxs: ctx.GlobalBool(flags.ClearPendingTxsFlag.Name),
/* Optional Flags */ /* Optional Flags */
LogLevel: ctx.GlobalString(flags.LogLevelFlag.Name),
SentryEnable: ctx.GlobalBool(flags.SentryEnableFlag.Name), SentryEnable: ctx.GlobalBool(flags.SentryEnableFlag.Name),
SentryDsn: ctx.GlobalString(flags.SentryDsnFlag.Name), SentryDsn: ctx.GlobalString(flags.SentryDsnFlag.Name),
SentryTraceRate: ctx.GlobalDuration(flags.SentryTraceRateFlag.Name), SentryTraceRate: ctx.GlobalDuration(flags.SentryTraceRateFlag.Name),
...@@ -217,10 +218,6 @@ func NewConfig(ctx *cli.Context) (Config, error) { ...@@ -217,10 +218,6 @@ func NewConfig(ctx *cli.Context) (Config, error) {
// ensure that it is well-formed. // ensure that it is well-formed.
func ValidateConfig(cfg *Config) error { func ValidateConfig(cfg *Config) error {
// Sanity check log level. // Sanity check log level.
if cfg.LogLevel == "" {
cfg.LogLevel = "debug"
}
_, err := log.LvlFromString(cfg.LogLevel) _, err := log.LvlFromString(cfg.LogLevel)
if err != nil { if err != nil {
return err return err
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment