-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Ingest Manager] Logging to file disabled on enroll #24466
[Ingest Manager] Logging to file disabled on enroll #24466
Conversation
Pinging @elastic/ingest-management (Team:Ingest Management) |
Pinging @elastic/agent (Team:Agent) |
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
// enroll is invoked either manually or from install with redirected IO | ||
// no need to log to file | ||
cfg.Settings.LoggingConfig.ToFiles = false | ||
cfg.Settings.LoggingConfig.ToStderr = true |
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.
Nice! Does this need to be set on any other subcommands?
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 we use just install
, uninstall
, upgrade
and reexec (on win)
where we don't use logger
enroll
where we use it
watcher
has its own configuration
and run
which is a normal state
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 for the response.
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.
Looks good.
[Ingest Manager] Logging to file disabled on enroll (elastic#24466)
[Ingest Manager] Logging to file disabled on enroll (elastic#24466)
…reporting-changes * upstream/master: (23 commits) [Auditbeat] btmp offset check (elastic#24515) Clarify that the Tomcat module is for ingesting access logs (elastic#24543) [Ingest Manager] Move logging defaults to agent (elastic#24535) Update input-http-endpoint.asciidoc (elastic#24490) Fix typo in mqtt input docs (elastic#24509) [Elastic Agent] Add verification check when updating communication to Kibana. (elastic#24489) Refactor use of system.hostfs to fix cgroup metrics (elastic#24334) Add test for close.reader.after_interval to filestream input (elastic#24423) chore(ci): use beat_version instead of PR version (elastic#24446) Add syntax for multiple selector logging (elastic#24207) (elastic#24497) Update Golang to 1.15.9 (elastic#24442) [Elastic Agent] Add the ability to provide custom CA's inside of docker. (elastic#24486) Add tests for encoding settings of filestream input (elastic#24426) [Ingest Manager] Sync on rename on windows (elastic#24504) Port four Harvester tests of log input to filestream in Golang (elastic#24250) [DOCS] Restructure content for SSL settings (elastic#24342) Move example to the correct location in reference docs (elastic#24455) Add unit tests for harvester.go of input-logfile package (elastic#24107) Fix type for uwsgi.status.worker.rss field (elastic#24468) [Ingest Manager] Logging to file disabled on enroll (elastic#24466) ...
elastic#24474) Cherry-pick elastic#24466 to 7.12: Logging to file disabled on enroll (elastic#24474)
What does this PR do?
The problem here is that enroll runs simultaneously with running service and both try to log into same file.
Although for enroll there's no need to do that as it is invoked either manually (with std output) or as executed from install command with std redirecting to a caller.
This PR makes sure to create internal logging file
elastic-agent-json.log
only in case it is really needed.Why is it important?
Fixes: #24173
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.