-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add option to enable logging into stdout using env variable #123
Conversation
Signed-off-by: see-quick <maros.orsak159@gmail.com>
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.
Why do you call it logToConsole
in one place and BrokerContainerSlf4jLogging
in the other? Would the same name everywhere make sense? Also, having javadocs explaining what it actually does would help. console
has many meanings for example.
Also, would some environment variable or system property be better for a switch like that? If you aim this for troubleshooting, then you likely do not want to modify the tests to troubleshooth but for example just set an environment variable maybe?
Wouldn't be better to log it to file instead of to console? Guess it can pollute the log quite quickly in case user will have more than few containers. |
So in that case I think it would be best to call
Yeah, this is a good point. I think it would be better to use ENV or system property here. The main reason it to just enhance current troubleshooting in CI.
That said we could have both options:
[1] - #119 |
Yes, sounds reasonable to me. I am thinking about option to force logging without env for certain situations/tests and I don't have strong opinion. I can imagine situations that might be useful, but user can also achieve ti with ENV option that will of course turn on logging for everything. |
Signed-off-by: see-quick <maros.orsak159@gmail.com>
Signed-off-by: see-quick <maros.orsak159@gmail.com>
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.
Maybe you should update the PR description and add something to the README.md file?
Signed-off-by: see-quick <maros.orsak159@gmail.com>
Yeah, thanks for it. I have updated it. |
* Add option to log container into stdout Signed-off-by: see-quick <maros.orsak159@gmail.com> * update use only ENV variable Signed-off-by: see-quick <maros.orsak159@gmail.com> * remove un-necessary Signed-off-by: see-quick <maros.orsak159@gmail.com> * Add a few words into README.md Signed-off-by: see-quick <maros.orsak159@gmail.com> * oops Signed-off-by: see-quick <maros.orsak159@gmail.com> * update Signed-off-by: see-quick <maros.orsak159@gmail.com> --------- Signed-off-by: see-quick <maros.orsak159@gmail.com>
This PR adds an option to enable logging into stdout using the env variable
STRIMZI_TEST_CONTAINER_LOGGING_ENABLED
.An example of the log can be found [1].
[1] - https://gist.githubusercontent.com/see-quick/8d88a97b533f8910ec2af135071b6ab7/raw/57e6cc73e8a875de75e0655677fac30bba5b67f8/gistfile1.txt