Skip to content

[Chore] Replace global logger with local logger instance #3#43657

Merged
khushijain21 merged 33 commits intoelastic:mainfrom
khushijain21:locallogger3
Apr 16, 2025
Merged

[Chore] Replace global logger with local logger instance #3#43657
khushijain21 merged 33 commits intoelastic:mainfrom
khushijain21:locallogger3

Conversation

@khushijain21
Copy link
Copy Markdown
Contributor

@khushijain21 khushijain21 commented Apr 3, 2025

Proposed commit message

This PR replaces global logger instances with local loggers in beats code.

Checklist

  • My code follows the style guidelines of this project
  • 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.

How to test this PR locally

Run this test in x-pack/filebeat/fbreceiver

go test -run ^TestMultipleReceivers$ ./x-pack/filebeat/fbreceiver -v

Related issues

@khushijain21 khushijain21 requested review from a team as code owners April 3, 2025 09:12
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Apr 3, 2025
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Apr 3, 2025

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @khushijain21? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-8./d is the label to automatically backport to the 8./d branch. /d is the digit
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-8 is the label that automatically backports to all active minor branches for the 8 major.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.

@khushijain21 khushijain21 added the Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team label Apr 3, 2025
@elasticmachine
Copy link
Copy Markdown
Contributor

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

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Apr 3, 2025
@khushijain21 khushijain21 marked this pull request as draft April 3, 2025 10:01
@khushijain21
Copy link
Copy Markdown
Contributor Author

/test

@khushijain21 khushijain21 marked this pull request as ready for review April 4, 2025 11:22
@khushijain21 khushijain21 requested review from a team as code owners April 4, 2025 11:22
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Apr 9, 2025

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 locallogger3 upstream/locallogger3
git merge upstream/main
git push upstream locallogger3

@khushijain21
Copy link
Copy Markdown
Contributor Author

cc: @qcorporation

@efd6
Copy link
Copy Markdown
Contributor

efd6 commented Apr 13, 2025

@khushijain21 Please replace the link in the proposed commit message entry with text that is publicly meaningful in the context of a git log output.

@khushijain21
Copy link
Copy Markdown
Contributor Author

cc: @nfritts

Copy link
Copy Markdown
Contributor

@ShourieG ShourieG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CODEOWNER Review

Copy link
Copy Markdown
Contributor

@taylor-swanson taylor-swanson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving for @elastic/sec-deployment-and-devices

@khushijain21 khushijain21 requested a review from AndersonQ April 15, 2025 05:07
@swiatekm
Copy link
Copy Markdown
Member

@khushijain21 could you address the linter warnings?

@khushijain21
Copy link
Copy Markdown
Contributor Author

@swiatekm/ @andrzej-stencel can you provide your approval?

@khushijain21 khushijain21 merged commit e2264dc into elastic:main Apr 16, 2025
232 checks passed
@khushijain21 khushijain21 added the backport-8.19 Automated backport to the 8.19 branch label Jun 9, 2025
mergify bot pushed a commit that referenced this pull request Jun 9, 2025
* [Chore] Replace global logger with local logger instance #3

(cherry picked from commit e2264dc)

# Conflicts:
#	filebeat/input/container/input.go
#	filebeat/input/log/input.go
#	x-pack/filebeat/input/gcppubsub/input.go
@khushijain21 khushijain21 deleted the locallogger3 branch June 9, 2025 07:45
khushijain21 added a commit that referenced this pull request Jun 9, 2025
* [Chore] Replace global logger with local logger instance #3
khushijain21 pushed a commit that referenced this pull request Jun 9, 2025
…er instance #3 (#44703)

* [Chore] Replace global logger with local logger instance #3 (#43657)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-8.19 Automated backport to the 8.19 branch Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team Team:obs-ds-hosted-services Label for the Observability Hosted Services team Team:Obs-InfraObs Label for the Observability Infrastructure Monitoring team Team:Security-Deployment and Devices Deployment and Devices Team in Security Solution Team:Security-Service Integrations Security Service Integrations Team Team:Security-Windows Platform Windows Platform Team in Security Solution

Projects

None yet

Development

Successfully merging this pull request may close these issues.