Conversation
Contributor
Author
|
Jenkins, test this please. |
|
Congratulations! One of the builds has completed. 🍾 You can install the built RPMs by following these steps:
Please note that the RPMs should be used only in a testing environment. |
snapm.command.main() calls setup_logging() after parsing arguments, and shutdown_logging() before returning. The setup call adds the console handler and configures the level and formatter according to the command line arguments. The call to logging.shutdown() flushes each handler but does _not_ close or remove them. In situations where the main() function is called repeatedly (for e.g. from the test suite) this leads to the installation of a duplicate log handler each time main() calls setup_logging(). The more times main() is called the more handlers are added leading to nonsense like: ERROR - Unrecognised field: nosuch ERROR - Unrecognised field: nosuch ERROR - Unrecognised field: nosuch ERROR - Unrecognised field: nosuch ERROR - Unrecognised field: nosuch ERROR - Unrecognised field: nosuch ERROR - Unrecognised field: nosuch ERROR - Unrecognised field: nosuch ERROR - Unrecognised field: nosuch ERROR - Unrecognised field: nosuch ERROR - Unrecognised field: nosuch ERROR - Unrecognised field: nosuch ERROR - Unrecognised field: nosuch ERROR - Unrecognised field: nosuch ERROR - Unrecognised field: nosuch ERROR - Unrecognised field: nosuch ERROR - Unrecognised field: nosuch ERROR - Unrecognised field: nosuch ERROR - Unrecognised field: nosuch ERROR - Unrecognised field: nosuch ERROR - Unrecognised field: nosuch ERROR - Unrecognised field: nosuch Fix this by checking whether our console handler is already present in snapm_log.handlers at setup and if it is just apply any log level changes according to the current command line.
Log test output to the console as well as to the test.log file.
b90610a to
387ab08
Compare
2025-01-21 16:04:34,567 DEBUG root Preparing test_activate_deactivate_snapsets 2025-01-21 16:04:53,181 DEBUG root Cleaning up Stratis (test_activate_deactivate_snapsets) 2025-01-21 16:04:55,735 DEBUG root Cleaning up LVM (test_activate_deactivate_snapsets)
387ab08 to
f2c3799
Compare
Contributor
Author
|
Jenkins, test this please. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.