-
Notifications
You must be signed in to change notification settings - Fork 44
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
kpm needs Debug Mode
to show and record more detailed logs
#366
Comments
Hey @zong-zhe, could you please assign this issue to me? I would like to work on it and come up with a solution. |
Hi @vinayakjaas 😄, Welcome! I have assigned this task to you, there are some more details. This task mainly includes three parts,
You can begin with a paperwork for Part 1, just update it into this issue, we can discuss and finally decide how to implement part one. |
Hey @zong-zhe I go through by various blogs and documentation to find out common patterns for error management in go programming and I come to following conclusion
By going through all reading part I plan approach to solve issue (part 1).This approach will enhance the clarity, consistency, and maintainability of the error management system in kpm.
Benefits
I am happy to listen you feedback and suggestions. So I move further accordingly Reference :- |
Hi @vinayakjaas 😄, Good job!I think the overall is in the right direction, next, you may need to provide some pseudo-codes, some simple examples, or demo your idea in a PR to show more details. For the three points, show a simple demo for them in a go file and same examples about how to use. A simple demo to help us understand better.
And one more thing I want to add about the logging system is that there may be some more non-error details in the logging system, which are not errors, but simply identifying what kpm is currently doing. |
Hey @zong-zhe I open Pull Request which cover Error Handling part in proper way. The following changes have been made: Updated errors.go
reporter.go
kpm.go
DemoSimulate an Error in client.NewKpmClient(): func NewKpmClient() (*KpmClient, error) {
return nil, goerr.New("simulated client creation error")
} Here I share two screenshots :- |
Feature Request
Is your feature request related to a problem? Please describe:
In some cases, the user needs to be able to see some more detailed log content to help the user understand what happened.
Describe the feature you'd like:
Add environment variables and CLI flag to control the
Debug Mode
on or off, and save the logs generated during kpm daily work in the log file in the ~/.kcl/kpm directory.Describe alternatives you've considered:
Teachability, Documentation, Adoption, Migration Strategy:
The text was updated successfully, but these errors were encountered: