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: intergrate logging function #1710

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

hanzili
Copy link

@hanzili hanzili commented Mar 18, 2024

Related Issue

When executing installation script, user can easily miss the log message and continue using keploy with a fail initlization (that's what happened to me T^T

Closes: #1701

Describe the changes you've made

  • Introduced log_message for standardized and color-coded logging.
  • Enhanced error handling to pause script execution and ensure user have acknowledged the errors.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, local variables)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Please let us know if any test cases are added

NA

Describe if there is any unusual behaviour of your code(Write NA if there isn't)

NA

Checklist:

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.

Screenshots (if any)

Now, when there is an error level logging, the execution will be paused until user acknowledge the message.
image

Signed-off-by: hanzili <hanzi.li@mail.mcgill.ca>
Copy link

github-actions bot commented Mar 18, 2024

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Thank you and congratulations 🎉 for opening your very first pull request in keploy

@hanzili
Copy link
Author

hanzili commented Mar 18, 2024

I have read the CLA Document and I hereby sign the CLA

@hanzili hanzili changed the title intergrate logging function feat: intergrate logging function Mar 19, 2024
@shivamsouravjha shivamsouravjha self-requested a review March 19, 2024 08:42
@shivamsouravjha
Copy link
Contributor

@hanzili it would be better if Keploy logs that docker daemon isn't running, reason being if someone has keploy installed, restarted laptop or stopped docker manually, once they try to run keploy they would face similar issue.

So it would be better approach to rather log in keploy

@hanzili
Copy link
Author

hanzili commented Apr 2, 2024

@hanzili it would be better if Keploy logs that docker daemon isn't running, reason being if someone has keploy installed, restarted laptop or stopped docker manually, once they try to run keploy they would face similar issue.

So it would be better approach to rather log in keploy

Sorry for getting back so late! Do you mean checking is docker is running when keploy starts? Could you explain more about the issue when someone restarted laptop or stopped docker manually as you mentioned? It sounds like a different issue than the one I encountered. My issue is that the keploy installation script does not initialize everything needed to run keploy (like creating keploy-network) and I did not realize that when using keploy.

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.

[bug]: Script Fails to Initialize keploy-network without Active Docker Session
2 participants