#1874 Introduce individual ConsoleLogger instance per class (#1875)

* #1874 Introduce individual ConsoleLogger instance per class
- Create ConsoleLoggerFactory from which a separate logger can be created for each class
- Allows to support individual log level settings in the future

* Fix CodeStyle issue

* Replace full class name with import

* Update usages after merge from master
This commit is contained in:
ljacqu
2019-08-06 15:15:16 +02:00
committed by Gabriele C
parent 254d4d75a2
commit c34f00f759
98 changed files with 853 additions and 387 deletions
@@ -4,6 +4,7 @@ import fr.xephi.authme.ConsoleLogger;
import fr.xephi.authme.data.limbo.LimboService;
import fr.xephi.authme.datasource.DataSource;
import fr.xephi.authme.events.ProtectInventoryEvent;
import fr.xephi.authme.output.ConsoleLoggerFactory;
import fr.xephi.authme.message.MessageKey;
import fr.xephi.authme.permission.PlayerStatePermission;
import fr.xephi.authme.process.AsynchronousProcess;
@@ -35,6 +36,8 @@ import static fr.xephi.authme.settings.properties.RestrictionSettings.PROTECT_IN
* Asynchronous process for when a player joins.
*/
public class AsynchronousJoin implements AsynchronousProcess {
private final ConsoleLogger logger = ConsoleLoggerFactory.get(AsynchronousJoin.class);
@Inject
private Server server;
@@ -112,7 +115,7 @@ public class AsynchronousJoin implements AsynchronousProcess {
isAsync -> new ProtectInventoryEvent(player, isAsync));
if (ev.isCancelled()) {
player.updateInventory();
ConsoleLogger.fine("ProtectInventoryEvent has been cancelled for " + player.getName() + "...");
logger.fine("ProtectInventoryEvent has been cancelled for " + player.getName() + "...");
}
}