Changed unnecessary server output to 'debug' log level

This commit is contained in:
Anuken
2019-01-24 16:36:48 -05:00
parent 923d0497e6
commit 76aa409f89
3 changed files with 11 additions and 6 deletions

View File

@@ -156,7 +156,7 @@ public class NetServer implements ApplicationListener{
return; return;
} }
Log.info("Recieved connect packet for player '{0}' / UUID {1} / IP {2}", packet.name, uuid, connection.address); Log.debug("Recieved connect packet for player '{0}' / UUID {1} / IP {2}", packet.name, uuid, connection.address);
String ip = Net.getConnection(id).address; String ip = Net.getConnection(id).address;
@@ -234,7 +234,7 @@ public class NetServer implements ApplicationListener{
data.stream = new ByteArrayInputStream(stream.toByteArray()); data.stream = new ByteArrayInputStream(stream.toByteArray());
Net.sendStream(clientID, data); Net.sendStream(clientID, data);
Log.info("Packed {0} compressed bytes of world data.", stream.size()); Log.debug("Packed {0} compressed bytes of world data.", stream.size());
} }
public static void onDisconnect(Player player){ public static void onDisconnect(Player player){
@@ -340,13 +340,13 @@ public class NetServer implements ApplicationListener{
public static void onAdminRequest(Player player, Player other, AdminAction action){ public static void onAdminRequest(Player player, Player other, AdminAction action){
if(!player.isAdmin){ if(!player.isAdmin){
Log.err("ACCESS DENIED: Player {0} / {1} attempted to perform admin action without proper security access.", Log.warn("ACCESS DENIED: Player {0} / {1} attempted to perform admin action without proper security access.",
player.name, player.con.address); player.name, player.con.address);
return; return;
} }
if(other == null || ((other.isAdmin && !player.isLocal) && other != player)){ if(other == null || ((other.isAdmin && !player.isLocal) && other != player)){
Log.err("{0} attempted to perform admin action on nonexistant or admin player.", player.name); Log.warn("{0} attempted to perform admin action on nonexistant or admin player.", player.name);
return; return;
} }

View File

@@ -61,7 +61,7 @@ public class KryoServer implements ServerProvider{
c.id = kn.id; c.id = kn.id;
c.addressTCP = ip; c.addressTCP = ip;
Log.info("&bRecieved connection: {0}", c.addressTCP); Log.debug("&bRecieved connection: {0}", c.addressTCP);
connections.add(kn); connections.add(kn);
Core.app.post(() -> Net.handleServerReceived(kn.id, c)); Core.app.post(() -> Net.handleServerReceived(kn.id, c));
@@ -90,7 +90,7 @@ public class KryoServer implements ServerProvider{
try{ try{
Net.handleServerReceived(k.id, object); Net.handleServerReceived(k.id, object);
}catch(ValidateException e){ }catch(ValidateException e){
Log.err("Validate failed: {0} ({1})", e.player.name, e.getMessage()); Log.err("Validation failed: {0} ({1})", e.player.name, e.getMessage());
}catch(Exception e){ }catch(Exception e){
e.printStackTrace(); e.printStackTrace();
} }

View File

@@ -62,6 +62,11 @@ public class ServerControl implements ApplicationListener{
Log.setLogger(new LogHandler(){ Log.setLogger(new LogHandler(){
DateTimeFormatter dateTime = DateTimeFormatter.ofPattern("MM-dd-yyyy | HH:mm:ss"); DateTimeFormatter dateTime = DateTimeFormatter.ofPattern("MM-dd-yyyy | HH:mm:ss");
@Override
public void debug(String text, Object... args){
print("&lc&fb" + "[DEBUG] " + text, args);
}
@Override @Override
public void info(String text, Object... args){ public void info(String text, Object... args){
print("&lg&fb" + "[INFO] " + text, args); print("&lg&fb" + "[INFO] " + text, args);