mirror of
https://github.com/GTNewHorizons/Opis.git
synced 2026-11-19 19:59:37 +00:00
Update to log4j
This commit is contained in:
1 parent
256643d671
commit
61a71eee38
11 files changed
+22
-19
No files matched your search
@@ -25,12 +25,12 @@ public enum MessageHandlerRegistrar {
|
||||
if (msgHandlers.containsKey(msg)){
|
||||
for (IMessageHandler handler : msgHandlers.get(msg)){
|
||||
if (!handler.handleMessage(msg, rawdata)){
|
||||
modOpis.log.warning(String.format("Unhandled msg %s in handler %s", msg, handler));
|
||||
modOpis.log.warn(String.format("Unhandled msg %s in handler %s", msg, handler));
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
modOpis.log.warning(String.format("Unhandled msg : %s", msg));
|
||||
modOpis.log.warn(String.format("Unhandled msg : %s", msg));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,8 @@ package mcp.mobius.opis.commands.server;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import com.google.common.collect.ImmutableSetMultimap;
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ public enum DataType {
|
||||
public static DataType getForClass(Class clazz){
|
||||
DataType type = bimap.inverse().get(clazz);
|
||||
if (type == null){
|
||||
modOpis.log.warning(String.format("Class %s was not registered with the DataType enum", clazz));
|
||||
modOpis.log.warn(String.format("Class %s was not registered with the DataType enum", clazz));
|
||||
}
|
||||
return type;
|
||||
}
|
||||
@@ -109,11 +109,11 @@ public enum DataType {
|
||||
DataType type = DataType.values()[ordinal];
|
||||
retVal = bimap.get(type);
|
||||
if (retVal == null){
|
||||
modOpis.log.warning(String.format("DataType doesn't have a class registered for %s", type));
|
||||
modOpis.log.warn(String.format("DataType doesn't have a class registered for %s", type));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
retVal = null;
|
||||
modOpis.log.warning(String.format("Index out of bound for ordinal %d in DataType", ordinal));
|
||||
modOpis.log.warn(String.format("Index out of bound for ordinal %d in DataType", ordinal));
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ public enum TileEntityManager {
|
||||
}
|
||||
}
|
||||
|
||||
modOpis.log.warning(String.format("Found %d potential orphans !", orphans.size()));
|
||||
modOpis.log.warn(String.format("Found %d potential orphans !", orphans.size()));
|
||||
|
||||
return orphans;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ public class ProfilerEntityUpdate extends ProfilerAbstract implements IProfilerB
|
||||
try{
|
||||
data.get(entity).addValue(clock.getDelta());
|
||||
} catch (Exception e){
|
||||
modOpis.log.warning(String.format("Error while profiling entity %s\n", key));
|
||||
modOpis.log.warn(String.format("Error while profiling entity %s\n", key));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -34,7 +34,7 @@ public class ProfilerRenderEntity extends ProfilerAbstract {
|
||||
//data.get((Entity)key).addValue((double)clock.getDelta());
|
||||
data.get(key).addValue(clock.getDelta());
|
||||
} catch (Exception e) {
|
||||
modOpis.log.warning(String.format("Error while profiling entity %s\n", key));
|
||||
modOpis.log.warn(String.format("Error while profiling entity %s\n", key));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -33,7 +33,7 @@ public class ProfilerRenderTileEntity extends ProfilerAbstract {
|
||||
try{
|
||||
data.get(key).addValue(clock.getDelta());
|
||||
} catch (Exception e) {
|
||||
modOpis.log.warning(String.format("Error while profiling entity %s\n", key));
|
||||
modOpis.log.warn(String.format("Error while profiling entity %s\n", key));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -98,7 +98,7 @@ public enum OpisClientTickHandler{
|
||||
tileEntData.add(dataTe);
|
||||
tileEntTotal += dataTe.update.timing;
|
||||
} catch (Exception e) {
|
||||
modOpis.log.warning(String.format("Error while adding entity %s to the list", te));
|
||||
modOpis.log.warn(String.format("Error while adding entity %s to the list", te));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ public enum OpisClientTickHandler{
|
||||
entData.add(dataEnt);
|
||||
entTotal += dataEnt.update.timing;
|
||||
} catch (Exception e) {
|
||||
modOpis.log.warning(String.format("Error while adding entity %s to the list", ent));
|
||||
modOpis.log.warn(String.format("Error while adding entity %s to the list", ent));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ public enum OpisClientTickHandler{
|
||||
DataBlockRender dataBlock = new DataBlockRender().fill(coord);
|
||||
blockData.add(dataBlock);
|
||||
} catch (Exception e) {
|
||||
modOpis.log.warning(String.format("Error while adding block %s to the list", coord));
|
||||
modOpis.log.warn(String.format("Error while adding block %s to the list", coord));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package mcp.mobius.opis;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.apache.commons.math3.stat.descriptive.DescriptiveStatistics;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
@@ -70,7 +70,7 @@ public class modOpis {
|
||||
@Instance("Opis")
|
||||
public static modOpis instance;
|
||||
|
||||
public static Logger log = Logger.getLogger("Opis");
|
||||
public static Logger log = LogManager.getLogger("Opis");
|
||||
|
||||
@SidedProxy(clientSide="mcp.mobius.opis.proxy.ProxyClient", serverSide="mcp.mobius.opis.proxy.ProxyServer")
|
||||
public static ProxyServer proxy;
|
||||
|
||||
@@ -2,7 +2,8 @@ package mcp.mobius.opis.network;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.monster.EntityMob;
|
||||
@@ -227,7 +228,7 @@ public class ServerMessageHandler {
|
||||
}
|
||||
|
||||
else{
|
||||
modOpis.log.log(Level.WARNING, String.format("Unknown data request : %s ", maintype));
|
||||
modOpis.log.log(Level.WARN, String.format("Unknown data request : %s ", maintype));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,8 @@ package mcp.mobius.opis.proxy;
|
||||
import java.awt.Font;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
Reference in new issue
Block a user