ElgarL / GroupManager

The original permission plug-in for Spigot/Bukkit.
https://elgarl.github.io/GroupManager/
GNU General Public License v3.0
80 stars 36 forks source link

PaperMC complains in logs when not using JavaPlugin#getLogger() #76

Closed josemmo closed 3 years ago

josemmo commented 3 years ago

Description

PaperMC introduced the following patch in its latest build:

Bukkit.getLogger().warning(
    String.format("Nag author(s): '%s' of '%s' about their usage of System.out/err.print. "
            + "Please use your plugin's logger instead (JavaPlugin#getLogger).",
        plugin.getDescription().getAuthors(),
        plugin.getName())
);

This warning gets triggered because of this line: https://github.com/ElgarL/GroupManager/blob/a7dbd1affd505d5a41cc4b4f7e414f9b8d6dc61b/src/org/anjocaido/groupmanager/GroupManager.java#L126

Server information

Additional context

[18:31:51] [Server thread/INFO]: [GroupManager] Enabling GroupManager v2.9 (Phoenix)
[18:31:52] [Server thread/INFO]: [GroupManager] [STDOUT] [GroupManager] World Found: world
[18:31:52] [Server thread/WARN]: Nag author(s): '[AnjoCaido, Gabriel Couto, ElgarL]' of 'GroupManager' about their usage of System.out/err.print. Please use your plugin's logger instead (JavaPlugin#getLogger).
[18:31:52] [Server thread/INFO]: [GroupManager] [STDOUT] [GroupManager] Superperms support enabled.
[18:31:52] [Server thread/WARN]: Nag author(s): '[AnjoCaido, Gabriel Couto, ElgarL]' of 'GroupManager' about their usage of System.out/err.print. Please use your plugin's logger instead (JavaPlugin#getLogger).
[18:31:52] [Server thread/INFO]: [GroupManager] [STDOUT] [GroupManager] Scheduled Data Saving is set for every 1440 minutes!
[18:31:52] [Server thread/WARN]: Nag author(s): '[AnjoCaido, Gabriel Couto, ElgarL]' of 'GroupManager' about their usage of System.out/err.print. Please use your plugin's logger instead (JavaPlugin#getLogger).
[18:31:52] [Server thread/INFO]: [GroupManager] [STDOUT] [GroupManager] Backups will be retained for 24 hours!
[18:31:52] [Server thread/WARN]: Nag author(s): '[AnjoCaido, Gabriel Couto, ElgarL]' of 'GroupManager' about their usage of System.out/err.print. Please use your plugin's logger instead (JavaPlugin#getLogger).
[18:31:52] [Server thread/INFO]: [GroupManager] [STDOUT] [GroupManager] version 2.9 (Phoenix) is enabled!
[18:31:52] [Server thread/WARN]: Nag author(s): '[AnjoCaido, Gabriel Couto, ElgarL]' of 'GroupManager' about their usage of System.out/err.print. Please use your plugin's logger instead (JavaPlugin#getLogger).

Temporal workaround

These "nags" (as called by the PaperMC team), although undocumented, can be disabled by adding the following argument when starting the server: -Dio.papermc.paper.suppress.sout.nags=true.

ElgarL commented 3 years ago

Thanks for this report. The logger was changed a while ago in Experimental so should not have that warning.