Use class loggers without the fqn for non-debug logging (#9012)

This commit is contained in:
Jake Potrebic 2023-03-20 01:23:52 -07:00
parent c54215c1b2
commit 4015d08acf
2 changed files with 19 additions and 19 deletions

View file

@ -483,7 +483,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ +
+public class PluginInitializerManager { +public class PluginInitializerManager {
+ +
+ private static final Logger LOGGER = LogUtils.getLogger(); + private static final Logger LOGGER = LogUtils.getClassLogger();
+ private static PluginInitializerManager impl; + private static PluginInitializerManager impl;
+ private final Path pluginDirectory; + private final Path pluginDirectory;
+ private final Path updateDirectory; + private final Path updateDirectory;
@ -2971,7 +2971,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ +
+public class MultiRuntimePluginProviderStorage extends ServerPluginProviderStorage { +public class MultiRuntimePluginProviderStorage extends ServerPluginProviderStorage {
+ +
+ private static final Logger LOGGER = LogUtils.getLogger(); + private static final Logger LOGGER = LogUtils.getClassLogger();
+ private final List<JavaPlugin> provided = new ArrayList<>(); + private final List<JavaPlugin> provided = new ArrayList<>();
+ +
+ @Override + @Override
@ -4989,7 +4989,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+public class DirectoryProviderSource extends FileProviderSource { +public class DirectoryProviderSource extends FileProviderSource {
+ +
+ public static final DirectoryProviderSource INSTANCE = new DirectoryProviderSource(); + public static final DirectoryProviderSource INSTANCE = new DirectoryProviderSource();
+ private static final Logger LOGGER = LogUtils.getLogger(); + private static final Logger LOGGER = LogUtils.getClassLogger();
+ +
+ public DirectoryProviderSource() { + public DirectoryProviderSource() {
+ super("File '%s'"::formatted); + super("File '%s'"::formatted);
@ -5197,7 +5197,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+public class PluginFlagProviderSource implements ProviderSource<List<File>> { +public class PluginFlagProviderSource implements ProviderSource<List<File>> {
+ +
+ public static final PluginFlagProviderSource INSTANCE = new PluginFlagProviderSource(); + public static final PluginFlagProviderSource INSTANCE = new PluginFlagProviderSource();
+ private static final Logger LOGGER = LogUtils.getLogger(); + private static final Logger LOGGER = LogUtils.getClassLogger();
+ private final FileProviderSource providerSource = new FileProviderSource("File '%s' specified through 'add-plugin' argument"::formatted); + private final FileProviderSource providerSource = new FileProviderSource("File '%s' specified through 'add-plugin' argument"::formatted);
+ +
+ @Override + @Override
@ -6124,7 +6124,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ +
+public class BootstrapProviderStorage extends SimpleProviderStorage<PluginBootstrap> { +public class BootstrapProviderStorage extends SimpleProviderStorage<PluginBootstrap> {
+ +
+ private static final Logger LOGGER = LogUtils.getLogger(); + private static final Logger LOGGER = LogUtils.getClassLogger();
+ +
+ public BootstrapProviderStorage() { + public BootstrapProviderStorage() {
+ super(new ModernPluginLoadingStrategy<>(new ProviderConfiguration<>() { + super(new ModernPluginLoadingStrategy<>(new ProviderConfiguration<>() {
@ -6229,7 +6229,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ +
+public class ServerPluginProviderStorage extends ConfiguredProviderStorage<JavaPlugin> { +public class ServerPluginProviderStorage extends ConfiguredProviderStorage<JavaPlugin> {
+ +
+ private static final Logger LOGGER = LogUtils.getLogger(); + private static final Logger LOGGER = LogUtils.getClassLogger();
+ +
+ public ServerPluginProviderStorage() { + public ServerPluginProviderStorage() {
+ super(new ProviderConfiguration<>() { + super(new ProviderConfiguration<>() {
@ -6300,7 +6300,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ +
+public abstract class SimpleProviderStorage<T> implements ProviderStorage<T> { +public abstract class SimpleProviderStorage<T> implements ProviderStorage<T> {
+ +
+ private static final Logger LOGGER = LogUtils.getLogger(); + private static final Logger LOGGER = LogUtils.getClassLogger();
+ +
+ protected final List<PluginProvider<T>> providers = new ArrayList<>(); + protected final List<PluginProvider<T>> providers = new ArrayList<>();
+ protected ProviderLoadingStrategy<T> strategy; + protected ProviderLoadingStrategy<T> strategy;
@ -6397,7 +6397,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ +
+public class EntrypointUtil { +public class EntrypointUtil {
+ +
+ private static final Logger LOGGER = LogUtils.getLogger(); + private static final Logger LOGGER = LogUtils.getClassLogger();
+ +
+ public static <C> void registerProvidersFromSource(ProviderSource<C> source, C context) { + public static <C> void registerProvidersFromSource(ProviderSource<C> source, C context) {
+ try { + try {

View file

@ -160,7 +160,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ +
+public abstract class Configurations<G, W> { +public abstract class Configurations<G, W> {
+ +
+ private static final Logger LOGGER = LogUtils.getLogger(); + private static final Logger LOGGER = LogUtils.getClassLogger();
+ public static final String WORLD_DEFAULTS = "__world_defaults__"; + public static final String WORLD_DEFAULTS = "__world_defaults__";
+ public static final ResourceLocation WORLD_DEFAULTS_KEY = new ResourceLocation("configurations", WORLD_DEFAULTS); + public static final ResourceLocation WORLD_DEFAULTS_KEY = new ResourceLocation("configurations", WORLD_DEFAULTS);
+ protected final Path globalFolder; + protected final Path globalFolder;
@ -1011,7 +1011,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+@SuppressWarnings("Convert2Diamond") +@SuppressWarnings("Convert2Diamond")
+public class PaperConfigurations extends Configurations<GlobalConfiguration, WorldConfiguration> { +public class PaperConfigurations extends Configurations<GlobalConfiguration, WorldConfiguration> {
+ +
+ private static final Logger LOGGER = LogUtils.getLogger(); + private static final Logger LOGGER = LogUtils.getClassLogger();
+ static final String GLOBAL_CONFIG_FILE_NAME = "paper-global.yml"; + static final String GLOBAL_CONFIG_FILE_NAME = "paper-global.yml";
+ static final String WORLD_DEFAULTS_CONFIG_FILE_NAME = "paper-world-defaults.yml"; + static final String WORLD_DEFAULTS_CONFIG_FILE_NAME = "paper-world-defaults.yml";
+ static final String WORLD_CONFIG_FILE_NAME = "paper-world.yml"; + static final String WORLD_CONFIG_FILE_NAME = "paper-world.yml";
@ -1502,7 +1502,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ +
+@SuppressWarnings({"FieldCanBeLocal", "FieldMayBeFinal", "NotNullFieldNotInitialized", "InnerClassMayBeStatic"}) +@SuppressWarnings({"FieldCanBeLocal", "FieldMayBeFinal", "NotNullFieldNotInitialized", "InnerClassMayBeStatic"})
+public class WorldConfiguration extends ConfigurationPart { +public class WorldConfiguration extends ConfigurationPart {
+ private static final Logger LOGGER = LogUtils.getLogger(); + private static final Logger LOGGER = LogUtils.getClassLogger();
+ static final int CURRENT_VERSION = 30; // (when you change the version, change the comment, so it conflicts on rebases): rename filter bad nbt from spawn eggs + static final int CURRENT_VERSION = 30; // (when you change the version, change the comment, so it conflicts on rebases): rename filter bad nbt from spawn eggs
+ +
+ private transient final SpigotWorldConfig spigotConfig; + private transient final SpigotWorldConfig spigotConfig;
@ -1993,7 +1993,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ +
+ public static final class Velocity implements Constraint<GlobalConfiguration.Proxies.Velocity> { + public static final class Velocity implements Constraint<GlobalConfiguration.Proxies.Velocity> {
+ +
+ private static final Logger LOGGER = LogUtils.getLogger(); + private static final Logger LOGGER = LogUtils.getClassLogger();
+ +
+ @Override + @Override
+ public void validate(final GlobalConfiguration.Proxies.@Nullable Velocity value) throws SerializationException { + public void validate(final GlobalConfiguration.Proxies.@Nullable Velocity value) throws SerializationException {
@ -2279,7 +2279,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ */ + */
+public class EnumValueSerializer extends ScalarSerializer<Enum<?>> { +public class EnumValueSerializer extends ScalarSerializer<Enum<?>> {
+ +
+ private static final Logger LOGGER = LogUtils.getLogger(); + private static final Logger LOGGER = LogUtils.getClassLogger();
+ +
+ public EnumValueSerializer() { + public EnumValueSerializer() {
+ super(new TypeToken<Enum<?>>() {}); + super(new TypeToken<Enum<?>>() {});
@ -2393,7 +2393,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+@SuppressWarnings("Convert2Diamond") +@SuppressWarnings("Convert2Diamond")
+public final class PacketClassSerializer extends ScalarSerializer<Class<? extends Packet<?>>> implements MapSerializer.WriteBack { +public final class PacketClassSerializer extends ScalarSerializer<Class<? extends Packet<?>>> implements MapSerializer.WriteBack {
+ +
+ private static final Logger LOGGER = LogUtils.getLogger(); + private static final Logger LOGGER = LogUtils.getClassLogger();
+ private static final TypeToken<Class<? extends Packet<?>>> TYPE = new TypeToken<Class<? extends Packet<?>>>() {}; + private static final TypeToken<Class<? extends Packet<?>>> TYPE = new TypeToken<Class<? extends Packet<?>>>() {};
+ private static final List<String> SUBPACKAGES = List.of("game", "handshake", "login", "status"); + private static final List<String> SUBPACKAGES = List.of("game", "handshake", "login", "status");
+ private static final BiMap<String, String> MOJANG_TO_OBF; + private static final BiMap<String, String> MOJANG_TO_OBF;
@ -2626,7 +2626,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ +
+ public static final TypeToken<Map<?, ?>> TYPE = new TypeToken<Map<?, ?>>() {}; + public static final TypeToken<Map<?, ?>> TYPE = new TypeToken<Map<?, ?>>() {};
+ +
+ private static final Logger LOGGER = LogUtils.getLogger(); + private static final Logger LOGGER = LogUtils.getClassLogger();
+ +
+ private final boolean clearInvalids; + private final boolean clearInvalids;
+ +
@ -3076,7 +3076,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+import static org.spongepowered.configurate.NodePath.path; +import static org.spongepowered.configurate.NodePath.path;
+ +
+public final class LegacyPaperConfig { +public final class LegacyPaperConfig {
+ private static final Logger LOGGER = LogUtils.getLogger(); + private static final Logger LOGGER = LogUtils.getClassLogger();
+ +
+ private LegacyPaperConfig() { + private LegacyPaperConfig() {
+ } + }
@ -3309,13 +3309,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ +
+import static org.spongepowered.configurate.NodePath.path; +import static org.spongepowered.configurate.NodePath.path;
+ +
+public class FeatureSeedsGeneration implements TransformAction { +public final class FeatureSeedsGeneration implements TransformAction {
+ +
+ public static final String FEATURE_SEEDS_KEY = "feature-seeds"; + public static final String FEATURE_SEEDS_KEY = "feature-seeds";
+ public static final String GENERATE_KEY = "generate-random-seeds-for-all"; + public static final String GENERATE_KEY = "generate-random-seeds-for-all";
+ public static final String FEATURES_KEY = "features"; + public static final String FEATURES_KEY = "features";
+ +
+ private static final Logger LOGGER = LogUtils.getLogger(); + private static final Logger LOGGER = LogUtils.getClassLogger();
+ +
+ private final ResourceLocation worldKey; + private final ResourceLocation worldKey;
+ +
@ -4064,7 +4064,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ +
+public interface IntOr { +public interface IntOr {
+ +
+ Logger LOGGER = LogUtils.getLogger(); + Logger LOGGER = LogUtils.getClassLogger();
+ +
+ default int or(final int fallback) { + default int or(final int fallback) {
+ return this.value().orElse(fallback); + return this.value().orElse(fallback);