-
Notifications
You must be signed in to change notification settings - Fork 32
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
Implement TraceFunctionCall; replace Tracef #146
base: master
Are you sure you want to change the base?
Implement TraceFunctionCall; replace Tracef #146
Conversation
Implements the TraceFunctionCall function in 'utils.go'. All 'log.Tracef()' calls in foreman/api were replaced by the new trace function. Refs terraform-coop#138 terraform-coop#138 (comment) Signed-off-by: Dominik Pataky <[email protected]>
Both functions wrap the log.* functions, adding the filename and line number of the calling function. Uses a switch to determine the final log.* function that is called. jobtemplate and template_input were refactored to use 'Debugf' instead of 'Debug'. For testing, domain.go was also refactored to use utils.* instead of log.*. Signed-off-by: Dominik Pataky <[email protected]>
Signed-off-by: Dominik Pataky <[email protected]>
Also removes the dependency on HanseMerkur/terraform-provider-utils/log in many files. Signed-off-by: Dominik Pataky <[email protected]>
Completes the refactoring from log.* to utils.* for better debugging output during provider runtime. Signed-off-by: Dominik Pataky <[email protected]>
Refactoring is complete. All This allows for a better debug output for users which have no code editor or debuggers at hand. During the refactoring I also fixed some other small issues like typos, formatting or flows. Nothing regarding any logic was changed though, so no user-side changes or errors are to be expected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might lead to conflicts with merging the other PRs. If you need another approval just ping me.
This merge didn't work, will look into it later this week. It's mainly cosmetic refactoring, so no new features are blocked for now. |
Implements the TraceFunctionCall function in 'utils.go'.
All 'log.Tracef()' calls are replaced with the new function.
Refs #138
See: #138 (comment)