beats icon indicating copy to clipboard operation
beats copied to clipboard

[8.19](backport #44675) [Chore] Replace global logger with local logger #9

Open mergify[bot] opened this issue 6 months ago • 5 comments

Proposed commit message

This PR replaces global logger instances with local loggers. Especially libbeat/conditions and filebeat/input/filestream

Checklist

  • [x] My code follows the style guidelines of this project
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] I have made corresponding change to the default configuration files
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Related issues

  • Part of https://github.com/elastic/ingest-dev/issues/5202
  • For https://github.com/elastic/ingest-dev/issues/5251
    This is an automatic backport of pull request #44675 done by Mergify.

mergify[bot] avatar Jun 25 '25 03:06 mergify[bot]

Cherry-pick of f11ccf465caaa8230562348274a174b89468733a has failed:

On branch mergify/bp/8.19/pr-44675
Your branch is up to date with 'origin/8.19'.

You are currently cherry-picking commit f11ccf465.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   filebeat/beater/filebeat.go
	modified:   filebeat/fileset/compatibility_test.go
	modified:   filebeat/fileset/modules_integration_test.go
	modified:   filebeat/fileset/pipelines_test.go
	modified:   filebeat/input/filestream/environment_test.go
	modified:   filebeat/input/filestream/fswatch.go
	modified:   filebeat/input/filestream/identifier_inode_deviceid.go
	modified:   filebeat/input/filestream/identifier_inode_deviceid_windows.go
	modified:   filebeat/input/filestream/identifier_test.go
	modified:   filebeat/input/filestream/input.go
	modified:   filebeat/input/filestream/internal/input-logfile/manager.go
	modified:   filebeat/input/filestream/prospector.go
	modified:   filebeat/input/filestream/prospector_creator.go
	modified:   filebeat/input/filestream/prospector_creator_test.go
	modified:   filebeat/input/filestream/prospector_test.go
	modified:   heartbeat/beater/heartbeat.go
	modified:   heartbeat/monitors/active/http/checkjson.go
	modified:   heartbeat/monitors/wrappers/monitorstate/testutil.go
	modified:   libbeat/autodiscover/appenders/config/config.go
	modified:   libbeat/autodiscover/template/config.go
	modified:   libbeat/cmd/instance/beat.go
	modified:   libbeat/common/event.go
	modified:   libbeat/common/event_test.go
	modified:   libbeat/common/seccomp/seccomp.go
	modified:   libbeat/conditions/and_test.go
	modified:   libbeat/conditions/conditions.go
	modified:   libbeat/conditions/conditions_benchmarks_test.go
	modified:   libbeat/conditions/conditions_test.go
	modified:   libbeat/conditions/equals.go
	modified:   libbeat/conditions/equals_test.go
	modified:   libbeat/conditions/matcher.go
	modified:   libbeat/conditions/matcher_test.go
	modified:   libbeat/conditions/network.go
	modified:   libbeat/conditions/network_test.go
	modified:   libbeat/conditions/not_test.go
	modified:   libbeat/conditions/range.go
	modified:   libbeat/conditions/range_test.go
	modified:   libbeat/esleg/eslegclient/api_test.go
	modified:   libbeat/esleg/eslegclient/bulkapi_mock_test.go
	modified:   libbeat/esleg/eslegclient/connection.go
	modified:   libbeat/esleg/eslegclient/connection_integration_test.go
	modified:   libbeat/esleg/eslegclient/connection_test.go
	modified:   libbeat/idxmgmt/lifecycle/client_handler_integration_test.go
	modified:   libbeat/licenser/elastic_fetcher_integration_test.go
	modified:   libbeat/licenser/elastic_fetcher_test.go
	modified:   libbeat/monitoring/report/elasticsearch/elasticsearch.go
	modified:   libbeat/outputs/elasticsearch/client.go
	modified:   libbeat/outputs/logstash/logstash_integration_test.go
	modified:   libbeat/outputs/outil/select.go
	modified:   libbeat/processors/conditionals.go
	modified:   libbeat/publisher/processing/processors.go
	modified:   libbeat/statestore/backend/es/store.go
	modified:   libbeat/template/load_integration_test.go
	modified:   metricbeat/autodiscover/appender/kubernetes/token/token.go
	modified:   metricbeat/module/elasticsearch/cluster_stats/cluster_stats.go
	modified:   metricbeat/module/elasticsearch/cluster_stats/data.go
	modified:   metricbeat/module/elasticsearch/index/data.go
	modified:   metricbeat/module/elasticsearch/index/data_test.go
	modified:   metricbeat/module/elasticsearch/index/index.go
	modified:   metricbeat/module/elasticsearch/testing.go
	modified:   packetbeat/beater/packetbeat.go
	modified:   winlogbeat/beater/winlogbeat.go
	modified:   x-pack/libbeat/autodiscover/providers/aws/ec2/fetch.go
	modified:   x-pack/libbeat/autodiscover/providers/aws/ec2/fetch_test.go
	modified:   x-pack/libbeat/autodiscover/providers/aws/ec2/provider_test.go
	modified:   x-pack/libbeat/autodiscover/providers/aws/ec2/watch.go
	modified:   x-pack/libbeat/autodiscover/providers/aws/ec2/watch_test.go
	modified:   x-pack/metricbeat/module/stan/stats/stats.go
	modified:   x-pack/metricbeat/module/statsd/server/data.go
	modified:   x-pack/metricbeat/module/statsd/server/data_test.go
	modified:   x-pack/metricbeat/module/statsd/server/registry.go
	modified:   x-pack/metricbeat/module/statsd/server/server.go
	modified:   x-pack/winlogbeat/module/testing.go
	modified:   x-pack/winlogbeat/module/wintest/docker_test.go
	modified:   x-pack/winlogbeat/module/wintest/simulate_test.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   filebeat/input/filestream/identifier.go
	both modified:   filebeat/input/filestream/identifier_fingerprint.go
	both modified:   filebeat/input/filestream/internal/input-logfile/manager_test.go
	both modified:   filebeat/tests/integration/filestream_test.go
	both modified:   x-pack/libbeat/autodiscover/providers/aws/ec2/provider.go

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

mergify[bot] avatar Jun 25 '25 03:06 mergify[bot]

Pinging @elastic/obs-ds-hosted-services (Team:obs-ds-hosted-services)

elasticmachine avatar Jun 25 '25 03:06 elasticmachine

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

elasticmachine avatar Jun 25 '25 03:06 elasticmachine

Pinging @elastic/sec-linux-platform (Team:Security-Linux Platform)

elasticmachine avatar Jun 25 '25 03:06 elasticmachine

Pinging @elastic/sec-windows-platform (Team:Security-Windows Platform)

elasticmachine avatar Jun 25 '25 03:06 elasticmachine

@khushijain21 looks like this one has merge conflicts that need to be fixed.

leehinman avatar Jun 27 '25 18:06 leehinman

This pull request is now in conflicts. Could you fix it? 🙏 To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b mergify/bp/8.19/pr-44675 upstream/mergify/bp/8.19/pr-44675
git merge upstream/8.19
git push upstream mergify/bp/8.19/pr-44675

mergify[bot] avatar Jun 30 '25 03:06 mergify[bot]

This pull request has not been merged yet. Could you please review and merge it @khushijain21? 🙏

mergify[bot] avatar Jun 30 '25 04:06 mergify[bot]

Requires https://github.com/elastic/beats/pull/44770

khushijain21 avatar Jun 30 '25 06:06 khushijain21

This pull request has not been merged yet. Could you please review and merge it @khushijain21? 🙏

mergify[bot] avatar Jul 07 '25 04:07 mergify[bot]