Deprecate fleet.agent.logging.level attribute #3195
Merged
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.
What is the problem this PR solves?
log level can be defined in two places in the config
How does this PR solve the problem?
Deprecate the fleet.agent.logging.level attribute and rely on the top level logging.* attributes instead. Add a unit test to make sure that command line overrides are respected.
How to test this PR locally
Download and run 8.13.0-SNAPSHOT
Set
ELASTICSEARCH_CA_TRUSTED_FINGERPRINT
andELASTICSEARCH_SERVICE_TOKEN
Alter the default fleet-server.yml to remove
Run the server with:
See that the logs output debug level:
And that the policy reload message has debug logs set:
When installing fleet-server under the elastic-agent we see the command used to invoke contains
-E logging.level=debug
:However we do not see any debug logs from fleet-server inbetween fleet-server's startup and the initial policy load loop in fleet-server where the agent wold send a policy with the log level set to info; this is due to the agent filtering the debug levels.
Checklist
I have made corresponding changes to the documentation./changelog/fragments
using the changelog toolRelated issues