Skip to content
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

Warn message for package scanning deprecation from pax-logging-api #549

Open
HeshanSudarshana opened this issue Feb 16, 2024 · 3 comments
Open
Assignees
Milestone

Comments

@HeshanSudarshana
Copy link

Hi,

We are currently using pax-logging version 2.1.0 currently and trying to migrate to the latest 2.2.7 version.

When trying to start the server I'm getting the following warning multiple times.

org.ops4j.pax.logging.pax-logging-api [log4j2] WARN : The use of package scanning to locate plugins is deprecated and will be removed in a future release

Further debugging the issue I identified that this is yielding from the line [1] in log4j-core version 2.22.1. This seems to be due to the following packages added from the PluginManager the pax-logging-log4j2 component [2].

Therefore, even there are no packages from our side, the warning messages are logged. Is there a way to work around this or am I missing something?

[1] https://github.com/apache/logging-log4j2/blob/rel/2.22.1/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/util/PluginManager.java#L128
[2] https://github.com/ops4j/org.ops4j.pax.logging/blob/logging-2.2.7/pax-logging-log4j2/src/main/java/org/ops4j/pax/logging/log4j2/internal/PaxLoggingServiceImpl.java#L79

Thanks in advance!

@grgrzybek
Copy link
Member

Thanks for the issue @HeshanSudarshana. #521 was created to prepare for next major Log4j release (3.0) and till then we'll be keeping Pax Logging 2.2.x compatible with Log4j2 2.x. This means upgrading to newer 2.22.0, 2.22.1, ..., etc. releases, but such warnings may appear unfortunately.

There's no way to quite down this message because I don't think we should change the way Pax Logging itself adds its plugin to Log4j2...

So please understand - we'll check this issue at next Pax Logging release (2.3.x).

@grgrzybek grgrzybek added this to the 2.3.0 milestone Feb 16, 2024
@grgrzybek grgrzybek self-assigned this Feb 16, 2024
@HeshanSudarshana
Copy link
Author

HeshanSudarshana commented Feb 16, 2024

Thanks for the response @grgrzybek, I understand that these kind of issues can occur when upgrading to the latest versions.

However, shouldn't the changes be done to avoid the usages of deprecated methods such as PluginManager.addPackages in a 2.2.x patch version as well?

@grgrzybek
Copy link
Member

deprecation in 2.22.x doesn't mean it'd be removed in any next 2.x (I hope). Anyway - I'm keeping the issue open, so I may review it and think about it. But to be honest I'm quite busy now with completely different issues (React...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants