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

Step Logging and changes to StepError type to errors #18

Merged
merged 5 commits into from
Nov 17, 2024
Merged

Conversation

TanmoySG
Copy link
Owner

@TanmoySG TanmoySG commented Nov 17, 2024

This pull request includes significant updates to the go-steps library, focusing on logging enhancements, error handling improvements, and updates to the example usage. The most important changes include the introduction of a logging mechanism using zerolog, modifications to error handling structures, and updates to the example code to demonstrate the new features.

Logging Enhancements:

  • Introduced a new logging mechanism using the zerolog package. The logger can be initialized with gosteps.NewGoStepsLogger and used within the context (go_step_logger.go).
  • Added the ability to log messages within step functions using the ctx.Log() method (go_step_context.go). [1] [2]

Error Handling Improvements:

  • Replaced the StepError type with the standard error type for better compatibility and simplicity (README.md, go_step_result.go, go_step_types.go). [1] [2]
  • Updated the StepResult struct and related methods to handle standard errors (go_step_result.go).

Example Code Updates:

  • Enhanced the example in example/multistep-example/main.go to demonstrate the new logging and error handling features, including retry logic and logging within steps. [1] [2] [3] [4] [5] [6] [7]

Documentation Updates:

  • Updated the README.md to reflect the changes in error handling and to include examples of the new logging functionality. [1] [2] [3]

Miscellaneous:

  • Updated the go.mod file to include the zerolog package and other dependencies.

Issue

@TanmoySG TanmoySG self-assigned this Nov 17, 2024
@TanmoySG TanmoySG added documentation Improvements or additions to documentation enhancement New feature or request feature feature labels Nov 17, 2024
Copy link
Owner Author

@TanmoySG TanmoySG left a comment

Choose a reason for hiding this comment

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

👍🏽

@TanmoySG TanmoySG merged commit aaa4e62 into main Nov 17, 2024
1 check passed
@TanmoySG TanmoySG deleted the log-step branch November 17, 2024 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request feature feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Step Logging [Feature] Logging Step Execution
1 participant