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

feat: add --debug flag to ratify CLI #1188

Merged
merged 5 commits into from
Nov 29, 2023
Merged

Conversation

Two-Hearts
Copy link
Contributor

This PR adds --debug persistent flag to ratify CLI root command.
When this flag is not set, environment variable RATIFY_LOG_LEVEL is used to set logger level.
When --debug is set, logger level is set to DEBUG.

Example usage:

ratify serve --debug ...

Resolves #1165

Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Copy link

codecov bot commented Nov 28, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (69bd336) 52.56% compared to head (7f3e0a2) 52.55%.

Files Patch % Lines
cmd/ratify/cmd/root.go 62.50% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1188      +/-   ##
==========================================
- Coverage   52.56%   52.55%   -0.01%     
==========================================
  Files         101      101              
  Lines        6344     6349       +5     
==========================================
+ Hits         3335     3337       +2     
- Misses       2688     2690       +2     
- Partials      321      322       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@junczhu junczhu left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@akashsinghal akashsinghal left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for adding this!

Copy link
Collaborator

@binbin-li binbin-li left a comment

Choose a reason for hiding this comment

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

lgtm

@binbin-li binbin-li merged commit 00f16de into ratify-project:main Nov 29, 2023
20 of 21 checks passed
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.

Support debug logging as a flag in Ratify CLI
4 participants