Improve update checker startup message logging (#4039)

* Use plugin logger for update checker
* Use info log level when update checker is disabled

Closes #4038.
This commit is contained in:
Josh Roy 2021-03-06 18:52:10 -05:00 committed by GitHub
parent 94d4385d41
commit eca6a9f247
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -392,9 +392,9 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials {
updateChecker = new UpdateChecker(this);
runTaskAsynchronously(() -> {
LOGGER.log(Level.INFO, tl("versionFetching"));
getLogger().log(Level.INFO, tl("versionFetching"));
for (String str : updateChecker.getVersionMessages(false, true)) {
LOGGER.log(Level.WARNING, str);
getLogger().log(getSettings().isUpdateCheckEnabled() ? Level.WARNING : Level.INFO, str);
}
});