Amélioration du système de logging

This commit is contained in:
2016-05-26 11:48:56 +02:00
parent 8b1f18fc1b
commit ab93d2a773
4 changed files with 48 additions and 7 deletions

View File

@@ -4,6 +4,8 @@ import java.io.IOException;
import java.io.PrintStream;
import java.net.Socket;
import fr.pandacube.java.PandacubeUtil;
/**
* Prends en charge un socket client et le transmet au gestionnaire de paquet correspondant.<br/>
@@ -41,7 +43,10 @@ public class PacketExecutor implements Runnable {
try {
rep.sendPacket(new PrintStream(socket.getOutputStream()));
} catch (IOException e1) { }
e.printStackTrace();
if (e instanceof IOException)
PandacubeUtil.getPluginLogger().warning("Impossible de lire le packet reçu sur le socket "+socket+" : "+e.toString());
else
e.printStackTrace();
}
try {