Skip to content

Conversation

@alexcams
Copy link
Contributor

@alexcams alexcams commented Oct 21, 2025

Release notes

  • Modified logger config to link deprecation logger to root logger by default.

What does this PR do?

  • Previous default logger configuration wasn't linking deprecation logger to root (plain) logger. As a result, users who weren't aware about the additivity parameter in Apache Log4j2 logger might be overlooking the deprecation logs. With this change, the deprecation logger is linked to the root by default and will only be unlinked if the user setsadditivity parameter to false.
  • Changed JAVA_HOME deprecated log to be logged by deprecation logger.

Why is it important/What is the impact to the user?

  • This commit lets users that are using the default logger configuration to be aware about deprecation logs just following Logstash default output

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 (and/or docker env variables)
  • [ ] I have added tests that prove my fix is effective or that my feature works

How to test this PR locally

  • Fetch Logstash version containing this changes, call deprecation_logger.deprecated() function with a test message and see it appears at default output as a WARN log.

Related issues

@alexcams alexcams added enhancement backport-active-9 Automated backport with mergify to all the active 9.[0-9]+ branches labels Oct 21, 2025
@github-actions
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

Copy link
Member

@jsvd jsvd left a comment

Choose a reason for hiding this comment

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

Can you look around logstash core code for any deprecation_logger calls that have a sibling plain logger call to workaround this? I recall in plugins this was done in a couple of places, meaning that we'd have 3 logger entries (deprecation log entry in 2 places + normal log entry).
Not sure if this happens in logstash core too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-active-9 Automated backport with mergify to all the active 9.[0-9]+ branches enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

deprecation logger should always wire back to the standard logger

3 participants