fix: route dependency logs through plugin logger instead of System.err#1059
Merged
fix: route dependency logs through plugin logger instead of System.err#1059
Conversation
#1050) Replace the shaded slf4j-simple binding (which writes to System.err) with a custom SLF4J 1.7.x binding that routes HikariCP and ORMLite log output through the plugin's CommonLogger on Bukkit. This eliminates the Paper/Spigot nag: "Please use your plugin's logger instead". - Swap slf4j-simple for slf4j-api in bukkit module - Add custom SLF4J binding (StaticLoggerBinder, BanManagerLoggerFactory, BanManagerSlf4jLogger) under org.slf4j.impl for Shadow relocation - Implement log level filtering in BanManagerSlf4jLogger (suppress TRACE/DEBUG/INFO unless debug mode is on) - Add severe(String, Throwable) and warning(String, Throwable) default methods to CommonLogger interface - Override with native logging in all 6 platform PluginLogger classes - Replace all ~220 e.printStackTrace() calls across common and platform modules with proper logger.warning()/logger.severe() calls - Add unit tests for CommonLogger methods and stderr regression test - Add E2E test verifying absence of Paper nag and [STDERR] lines Closes #1050
…gger - Add ReloadListener for Sponge API 11+ to re-register chat listener on bmreload, matching Bukkit/Bungee/Velocity/Sponge-API7 (missing since #1022) - Pass Throwable through in BanManagerSlf4jLogger trace/debug/info methods instead of silently dropping it when debug mode is enabled - Remove duplicate log line in Sponge JoinListener
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace the shaded slf4j-simple binding (which writes to System.err) with a custom SLF4J 1.7.x binding that routes HikariCP and ORMLite log output through the plugin's CommonLogger on Bukkit. This eliminates the Paper/Spigot nag: "Please use your plugin's logger instead".
Closes #1050