mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-11-04 15:43:00 +00:00
Use our global logger instead of per-class ones
No slf4j available for 1.16.5, and I'll forget if I depend on log4j.
This commit is contained in:
@@ -6,13 +6,12 @@
|
||||
package dan200.computercraft.data;
|
||||
|
||||
import com.google.gson.JsonElement;
|
||||
import dan200.computercraft.ComputerCraft;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.data.*;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.nio.file.Path;
|
||||
@@ -32,8 +31,6 @@ import java.util.function.Supplier;
|
||||
*/
|
||||
public class ModelProvider implements IDataProvider
|
||||
{
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
|
||||
private final DataGenerator generator;
|
||||
|
||||
private final Consumer<BlockModelProvider> blocks;
|
||||
@@ -97,7 +94,7 @@ public class ModelProvider implements IDataProvider
|
||||
}
|
||||
catch( Exception exception )
|
||||
{
|
||||
LOGGER.error( "Couldn't save {}", path, exception );
|
||||
ComputerCraft.log.error( "Couldn't save {}", path, exception );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
package dan200.computercraft.shared.computer.metrics;
|
||||
|
||||
import com.google.common.base.CaseFormat;
|
||||
import dan200.computercraft.ComputerCraft;
|
||||
import dan200.computercraft.core.metrics.Metric;
|
||||
import dan200.computercraft.core.metrics.Metrics;
|
||||
import dan200.computercraft.shared.computer.core.ServerComputer;
|
||||
@@ -15,8 +16,6 @@ import dan200.computercraft.shared.computer.metrics.basic.AggregatedMetric;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.management.*;
|
||||
@@ -33,8 +32,6 @@ import java.util.function.LongSupplier;
|
||||
*/
|
||||
public final class ComputerMBean implements DynamicMBean, ComputerMetricsObserver
|
||||
{
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger( ComputerMBean.class );
|
||||
|
||||
private static @Nullable ComputerMBean instance;
|
||||
|
||||
private final Map<String, LongSupplier> attributes = new HashMap<>();
|
||||
@@ -66,7 +63,7 @@ public final class ComputerMBean implements DynamicMBean, ComputerMetricsObserve
|
||||
catch( InstanceAlreadyExistsException | MBeanRegistrationException | NotCompliantMBeanException |
|
||||
MalformedObjectNameException e )
|
||||
{
|
||||
LOGGER.warn( "Failed to register JMX bean", e );
|
||||
ComputerCraft.log.warn( "Failed to register JMX bean", e );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user