diff options
author | Kyle Gunger <corechg@gmail.com> | 2020-04-16 00:36:41 -0400 |
---|---|---|
committer | Kyle Gunger <corechg@gmail.com> | 2020-04-16 00:36:41 -0400 |
commit | bbfbb508919459d9885bd9d690c1c483e7e3f70b (patch) | |
tree | c663f0e8b2dea1f79239a37cc12ae25bb9e75cb4 /src/main/java/net/transit | |
parent | 9c071a9d077a11865a83246152fffc8ea09e2666 (diff) |
[Update to 1.15.2] Version 0.7.1
Diffstat (limited to 'src/main/java/net/transit')
-rw-r--r-- | src/main/java/net/transit/type/group/GroupRegistry.java | 5 | ||||
-rw-r--r-- | src/main/java/net/transit/type/group/TypeGroup.java | 15 |
2 files changed, 9 insertions, 11 deletions
diff --git a/src/main/java/net/transit/type/group/GroupRegistry.java b/src/main/java/net/transit/type/group/GroupRegistry.java index 8f8a612..12ffffc 100644 --- a/src/main/java/net/transit/type/group/GroupRegistry.java +++ b/src/main/java/net/transit/type/group/GroupRegistry.java @@ -11,7 +11,6 @@ public class GroupRegistry { private static final ArrayList<TypeGroup<?>> GROUPS = new ArrayList<TypeGroup<?>>(0); private static final Logger LOG = LogManager.getFormatterLogger("Transit|GroupRegistry"); - private static final String prefix = "[" + LOG.getName() + "] "; private GroupRegistry() {} @@ -21,13 +20,13 @@ public class GroupRegistry { { if(g.getGroup().equals(group.getGroup())) { - LOG.warn(prefix + "Failed to add group " + group.getGroup() + " to the registry. Did another mod add a group with the same name?"); + LOG.warn("Failed to add group " + group.getGroup() + " to the registry. Did another mod add a group with the same name?"); return false; } } GROUPS.add(group); - LOG.info(prefix + "Successfully added group " + group.getGroup() + " to the registry."); + LOG.info("Successfully added group " + group.getGroup() + " to the registry."); return true; } diff --git a/src/main/java/net/transit/type/group/TypeGroup.java b/src/main/java/net/transit/type/group/TypeGroup.java index 6cea6dd..a3ab622 100644 --- a/src/main/java/net/transit/type/group/TypeGroup.java +++ b/src/main/java/net/transit/type/group/TypeGroup.java @@ -22,7 +22,6 @@ public class TypeGroup<B> // Logger for events in the TypeGroup. private static final Logger LOG = LogManager.getFormatterLogger("Transit|Group"); - private static final String prefix = "[" + LOG.getName() + "] "; public TypeGroup(Type<B> base) @@ -46,11 +45,11 @@ public class TypeGroup<B> if(!isInGroup(type.getGroup(), type.getType())) { TYPES.add(type); - LOG.info(prefix + "Added type " + type.getType() + ":" + type.getGroup() + " to group " + getGroup()); + LOG.info("Added type " + type.getType() + ":" + type.getGroup() + " to group " + getGroup()); return true; } - LOG.info(prefix + "Failed to add type " + type.getType() + ":" + type.getGroup() + " to group " + getGroup() + ". Was the type already added?"); + LOG.info("Failed to add type " + type.getType() + ":" + type.getGroup() + " to group " + getGroup() + ". Was the type already added?"); return false; } @@ -62,17 +61,17 @@ public class TypeGroup<B> public boolean removeType(Type<B> type) { if(type.equals(baseType)) { - LOG.warn(prefix + "[WARN] Failed to remove type " + type.getGroup() + ":" + type.getType() + " from group " + getGroup() + ". This is the base type and can not be removed."); + LOG.warn("[WARN] Failed to remove type " + type.getGroup() + ":" + type.getType() + " from group " + getGroup() + ". This is the base type and can not be removed."); return false; } if(TYPES.indexOf(type) != -1) { - LOG.info(prefix + "Removed type " + TYPES.remove(TYPES.indexOf(type)).getType() + " from group " + getGroup()); + LOG.info("Removed type " + TYPES.remove(TYPES.indexOf(type)).getType() + " from group " + getGroup()); return true; } - LOG.warn(prefix + "[WARN] Failed to remove type " + type.getGroup() + ":" + type.getType() + " from group " + getGroup() + ". Are we sure that the type was added to the group first?"); + LOG.warn("[WARN] Failed to remove type " + type.getGroup() + ":" + type.getType() + " from group " + getGroup() + ". Are we sure that the type was added to the group first?"); return false; } @@ -88,12 +87,12 @@ public class TypeGroup<B> { if(type.getGroup().equals(groupID) && type.getType().equals(typeID)) { - LOG.info(prefix + "Removed type " + TYPES.remove(TYPES.indexOf(type)).getType() + " from group " + getGroup()); + LOG.info("Removed type " + TYPES.remove(TYPES.indexOf(type)).getType() + " from group " + getGroup()); return true; } } - LOG.warn(prefix + "[WARN] Failed to remove type " + groupID + ":" + typeID + " from group " + getGroup() + ". Are we sure that the type was added to the group first?"); + LOG.warn("[WARN] Failed to remove type " + groupID + ":" + typeID + " from group " + getGroup() + ". Are we sure that the type was added to the group first?"); return false; } |