oddlama / vane

Immersive and lore friendly enhancements for vanilla Minecraft
MIT License
276 stars 34 forks source link

Nag waning for using System.out/err.print. #30

Closed 7368697661 closed 3 years ago

7368697661 commented 3 years ago

Hey!

Loving the plugin so far (seriously, the portals are a new server staple for me, couldn't play without them), however, is there any way to quiet the log/console spam from the following warning? It sends every time a player sends a chat message. Not the end of the world, but somewhat obnoxious due to cluttering the console/log.

[Server] WARN Nag author(s): '[oddlama]' of 'vane-admin' about their usage of System.out/err.print. Please use your plugin's logger instead (JavaPlugin#getLogger).

Thanks!

oddlama commented 3 years ago

I'm glad you like it!

Thanks for bringing this to my attention. At first I wasn't sure what warning you mean, but it seems that PaperMC has added this just 3 days ago with a patch on the 2nd of August.

If I understand PaperMC's patch correctly, you should be able to silence the warning for the time being by appending -Dio.papermc.paper.suppress.sout.nags=true to your parameters when starting paper, like this:

java -Dio.papermc.paper.suppress.sout.nags=true -jar paper.jar

I'd argue it's a good warning, but in this case it's rather unfortunate. Let me elaborate:

Usually the logger should be used to ensure that plugin messages look like this: "[pluginname] The message", which is good. I suspect you are getting the message every time a player says something and it is logged to the console, because this is the only place I specifically used System.out.println so that chat messages can have the "[chat]" tag instead of "[vane-admin]" which would be awkward.

Of course this should be fixed properly on my side, so I guess I'll have to come up with something. But as I'm busy the next two months I won't have time to do so now. I'll leave this issue open until I get around to fix it, and I hope you can use the workaround above until then.