libcontainerd/supervisor: set log-level through the config-file#48355
Merged
thaJeztah merged 1 commit intomoby:masterfrom Aug 23, 2024
Merged
Conversation
The config.logLevel field, when set, is used to set the `--log-level` flag when starting the managed `containerd` binary. This flag is the equivalent to setting the `Config.Debug.Level` field, as can be seen in the [`md/containerd/command.setLogLevel()`][1] function. As we're already producing a generated containerd configuration file, and this file already includes `Debug` options, we might as well include the option in that file, instead of using the `--log-level` flag. For entertainment of whoever reads this commit-message, it's worth noting that previously we were writing this option to the config-file, and yours truly removed that part in b6b0b0a, but to my defence, we were _also_ setting the `--log-level` flag at the time :) [1]: https://github.com/containerd/containerd/blob/v1.7.20/cmd/containerd/command/main.go#L348-L357 Signed-off-by: Sebastiaan van Stijn <[email protected]>
f41c468 to
abcb9e9
Compare
austinvazquez
approved these changes
Aug 22, 2024
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.
The config.logLevel field, when set, is used to set the
--log-levelflag when starting the managedcontainerdbinary. This flag is the equivalent to setting theConfig.Debug.Levelfield, as can be seen in themd/containerd/command.setLogLevel()function.As we're already producing a generated containerd configuration file, and this file already includes
Debugoptions, we might as well include the option in that file, instead of using the--log-levelflag.For entertainment of whoever reads this commit-message, it's worth noting that previously we were writing this option to the config-file, and yours truly removed that part in b6b0b0a, but to my defence, we were also setting the
--log-levelflag at the time :)