-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Refactor logging in start.sh and add JUPYTER_DOCKER_STACKS_QUIET #1526
Conversation
f974efe
to
a59c3bb
Compare
It is meant to allow you to opt out from non-error non-warning logs generated by start.sh.
Make noise when JUPYTER_DOCKER_STACKS_QUIET is empty
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.
Looks awesome:
Possible future improvements (just a note for someone, who will want to improve our docker stacks):
- Always add log_level like this: `_log "INFO" "my_message"
- Based on log level color can be added.
- Exit on fatal errors (or maybe just errors)
- Add timestamps, like
INFO[2021-08-23 11:00:00.000000] my_message
- Stop using
bash
, haha 👍
@maresb maybe you could add a test for this variable?
@maresb |
⬆️ ✔️ ⬆️ ✔️ ⬆️ ✔️ I'm convinced that this right here is the root of most of our problems. If we get a comprehensive test suite for |
Hmm, seems to be a CI error, I'll restart. |
@maresb @consideRatio I gave this a thought - do we really need JUPYTER_DOCKER_STACKS_QUIET? I personally think it's easier to remove this variable and merge this PR without adding a test case. |
I recall adding it initially because there was some noise about "if this emits logs, it means my automation runs into trouble that parses the output" or similar. I've lost track of the change motivation at this point, but I recall it wasn't stemming from solving a problem of my own. Any outcome is fine by me, but I figure for anyone using this to run a quick command in the container separate from starting the main process or similar, wanting to inspect the output of that command, this does make some sense. |
I updated the issue, let's merge this 👍 |
Cherry-pick of 63295ba, working through #1512 (comment)