-
Notifications
You must be signed in to change notification settings - Fork 92
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 logging #117
feat: add logging #117
Conversation
Codecov Report
@@ Coverage Diff @@
## main #117 +/- ##
==========================================
- Coverage 72.33% 71.43% -0.91%
==========================================
Files 24 24
Lines 2668 2727 +59
==========================================
+ Hits 1930 1948 +18
- Misses 556 593 +37
- Partials 182 186 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
This pull request has been linked to Shortcut Story #4433: Add logging support to terramate. |
@mariux Could you have a look at the last commit and check if this is what you're thinking? Also check the comment at the top for assumptions I've made and how I've chosen to structure the logs. Thank you. |
let's get this merged asap as conflicts will always show up... |
c38fddd
to
ceb1a94
Compare
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.
lgtm
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.
LGTM, it seems to not break anything + tested manually and default is still silent + activated logging and seems OK (although default is json, on the help it says it is text, not sure, can be fized on another PR).
There is a lot of log entries setting a field "stack" to what is actually the working dir, even on contexts where it is not about stacks at all, and on context where stacks exist the path is incorrect (sometimes using the working dir). But all that can be fixed on a follow up PR.
Thanks for all the work @kassianh 💯
@@ -200,21 +220,34 @@ func newCLI( | |||
} | |||
} | |||
|
|||
logger := log.With(). | |||
Str("action", "newCli()"). | |||
Str("stack", wd). |
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.
Str("stack", wd). | |
Str("workingDir", wd). |
@kassianh please ignore requested changes and merge first and open a follow-up PR with all changes addressed.. this way we can reduce need for rebases and can start using it... great inital work! kudos! and big thanks.. |
https://app.shortcut.com/mineiros/story/4433/add-logging-support-to-terramate
Logging is done for any action or decision.
()
to improve readibility.
at end to improve readibility.Other relevant info should also be logged