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

Ensure LOGGER is not equal to plugin logger before setting parent #1570

Merged
merged 1 commit into from
Sep 30, 2017
Merged

Ensure LOGGER is not equal to plugin logger before setting parent #1570

merged 1 commit into from
Sep 30, 2017

Conversation

stephan-gh
Copy link
Contributor

PaperMC/Paper#890 introduced minor changes to the plugin logger to make plugin prefixes independent from the logging framework. As a result, the plugin logger now uses the plugin name as name.

Essentials uses the same logger name and redirects messages to the plugin logger by setting it as a parent. However, in newer Paper builds both loggers are now equal, resulting in infinite loops when logging messages because the logger has itself as parent.

Make sure the two loggers are not equal before setting the parent to avoid the following warning on newer Paper builds:

[Essentials] Ignoring attempt to change parent of plugin logger

(On Spigot and older Paper builds this will not be true so the parent is still set correctly.)

PaperMC/Paper#890 introduced minor changes to the plugin logger to
make plugin prefixes independent from the logging framework. As a
result, the plugin logger now uses the plugin name as name.

Essentials uses the same logger name and redirects messages to the
plugin logger by setting it as a parent. However, in newer Paper
builds both loggers are now equal, resulting in infinite loops when
logging messages because the logger has itself as parent.

Make sure the two loggers are not equal before setting the parent to
avoid the following warning on newer Paper builds:

    [Essentials] Ignoring attempt to change parent of plugin logger
@SupaHam SupaHam merged commit 2c4ff35 into EssentialsX:2.x Sep 30, 2017
@SupaHam
Copy link
Member

SupaHam commented Sep 30, 2017

Thank you. :)

@stephan-gh stephan-gh deleted the paper-logger-parent branch September 30, 2017 15:52
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

Successfully merging this pull request may close these issues.

3 participants