Refactored the logging
Using LogManager instead of FMLRelaunchLog to access the logger instance. Added logging of the name of failed exports instead of exception. Improved crafting log to include issuer including their location and the requested item. Removed superfluous FMLRelaunchLog instance. Removed superfluous parameters for PlayerData constructor.
This commit is contained in:
@@ -117,8 +117,8 @@ final class MinecraftItemCSVExporter implements Exporter
|
||||
}
|
||||
catch( final IOException e )
|
||||
{
|
||||
AELog.warning( EXPORT_UNSUCCESSFUL_MESSAGE );
|
||||
AELog.error( e );
|
||||
AELog.warn( EXPORT_UNSUCCESSFUL_MESSAGE );
|
||||
AELog.debug( e );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -198,6 +198,7 @@ final class MinecraftItemCSVExporter implements Exporter
|
||||
private static final String LOCALIZATION_NAME_EXTENSION = ".name";
|
||||
private static final String EXPORTING_NOTHING_MESSAGE = "Exporting nothing";
|
||||
private static final String EXPORTING_SUBTYPES_MESSAGE = "Exporting input %s with subtypes: %b";
|
||||
private static final String EXPORTING_SUBTYPES_FAILED_MESSAGE = "Could not export subtypes of: %s";
|
||||
|
||||
@Nonnull
|
||||
private final FMLControlledNamespacedRegistry<Item> itemRegistry;
|
||||
@@ -243,7 +244,8 @@ final class MinecraftItemCSVExporter implements Exporter
|
||||
}
|
||||
catch( final Exception ignored )
|
||||
{
|
||||
AELog.error( ignored );
|
||||
AELog.warn( EXPORTING_SUBTYPES_FAILED_MESSAGE, input.getUnlocalizedName() );
|
||||
AELog.debug( ignored );
|
||||
|
||||
// ignore if mods do bullshit in their code
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user