-
Notifications
You must be signed in to change notification settings - Fork 354
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
Introduce a log-level
flag.
#2036
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #2036 +/- ##
==========================================
- Coverage 64.82% 64.80% -0.03%
==========================================
Files 129 129
Lines 14763 14765 +2
==========================================
- Hits 9570 9568 -2
- Misses 5193 5197 +4 |
@@ -24,7 +24,7 @@ if [ ! -f ${ROOT}/bundle.tar.gz ]; then | |||
fi | |||
touch ${LOGFILE} | |||
|
|||
sudo YOUKI_LOG_LEVEL="error" ${ROOT}/integration_test run --runtime "$RUNTIME" --runtimetest ${ROOT}/runtimetest > $LOGFILE | |||
sudo ${ROOT}/integration_test run --runtime "$RUNTIME" --runtimetest ${ROOT}/runtimetest > $LOGFILE |
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.
We should be also passing the --log-level flag here, set to error, right?
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.
No, this script is calling the integration_test binary, which don't take the log-level
flag. At least I did not make the change in this PR. The actual code that calls the runtime
inside the integration_test is changed to add the log-level
flag. The integration_test binary uses YOUKI_INTEGRATION_LOG_LEVEL
env variable. https://github.com/containers/youki/blob/1a6d1f4bd7553e971d6d787698a9732836188444/tests/rust-integration-tests/integration_test/src/logger.rs#L6
It is possible that the original intent is YOUKI_INTEGRATION_LOG_LEVEL
?
@@ -171,3 +171,13 @@ cd .. | |||
./youki list | |||
./youki delete rootless_container | |||
``` | |||
|
|||
#### Log level |
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.
👍
In short: Propose the default log level for release to error Keep the --debug flag and it sets the log level to debug Introduce --log-level flag to set the log level --debug flag will be ignored if --log-level flag is also set. Keep the default log level for debug build to debug Signed-off-by: yihuaf <[email protected]>
Signed-off-by: yihuaf <[email protected]>
Signed-off-by: yihuaf <[email protected]>
Signed-off-by: yihuaf <[email protected]>
@utam0k removed the |
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.
💯 Thanks a lot 🙏
Fix #2028
As proposed in #2028, we introduce a
--log-level
flag to allow us to easily set log level through runtimes. To avoid confusion, we also deprecated setting log level throughenv
variable. The--debug
flag is kept for compatibility reasons.Note, the integration test was not changed in this PR. If this PR is accepted, we will make the changes to the rust integration test to keep things consistent.