Skip to content

Commit

Permalink
Add caller option to --logger override
Browse files Browse the repository at this point in the history
  • Loading branch information
jsimnz committed Jul 30, 2022
1 parent b5b4aa0 commit 27aa302
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,12 @@ func parseAndConfigLogAllParams(ctx context.Context, cfg *config.LoggingConfig,
return fmt.Errorf("couldn't parse kv bool: %w", err)
}
logcfg.NoColor = boolValue
case "caller": // bool
boolValue, err := strconv.ParseBool(parsedKV[1])
if err != nil {
return fmt.Errorf("couldn't parse kv bool: %w", err)
}
logcfg.Caller = boolValue
default:
return fmt.Errorf("unknown parameter for logger: %s", param)
}
Expand Down

0 comments on commit 27aa302

Please sign in to comment.