Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd: add --log-level CLI flag #15

Merged
merged 5 commits into from
Oct 17, 2024
Merged

cmd: add --log-level CLI flag #15

merged 5 commits into from
Oct 17, 2024

Conversation

lgfa29
Copy link
Contributor

@lgfa29 lgfa29 commented Oct 15, 2024

Allow specifying the log level directly as the global CLI flag --log-level.

Draft for now since it requires loopholelabs/logging#7 and loopholelabs/logging#8. Merged!

@lgfa29 lgfa29 force-pushed the add-log-level-flag branch from 193f9f6 to 9a36b0e Compare October 15, 2024 16:10
Allow specifying the log level directly as the global CLI flag
`--log-level`.

Signed-off-by: Luiz Aoqui <luizaoqui@loopholelabs.io>
@lgfa29 lgfa29 force-pushed the add-log-level-flag branch from 9a36b0e to 9ff17c8 Compare October 15, 2024 16:13
Signed-off-by: Luiz Aoqui <luizaoqui@loopholelabs.io>
Signed-off-by: Luiz Aoqui <luizaoqui@loopholelabs.io>
@lgfa29 lgfa29 marked this pull request as ready for review October 16, 2024 23:52
@lgfa29 lgfa29 requested review from ShivanshVij and pojntfx October 16, 2024 23:52
Comment on lines 87 to 93
// Common configuration values.
Format string
Debug bool
NoColor bool `mapstructure:"no-color"`

// Custom configuration values.
MyConfig string `mapstructure:"my-config"`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was using these in a WIP set of config tests that I may push in the future, but they're not exactly necessary in this PR. I can remove them for now, but they also don't really affect anything.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Format,Debug, NoColor are all fine, but MyConfig seems out of place and might confuse, so let's get rid of that for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, sounds good. Removed in 570b233

Copy link
Member

@ShivanshVij ShivanshVij left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

ShivanshVij and others added 2 commits October 16, 2024 16:58
Signed-off-by: Shivansh Vij <shivanshvij@loopholelabs.io>
Signed-off-by: Luiz Aoqui <luizaoqui@loopholelabs.io>
@lgfa29 lgfa29 merged commit 338db99 into main Oct 17, 2024
2 checks passed
@lgfa29 lgfa29 deleted the add-log-level-flag branch October 17, 2024 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants