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:
@@ -101,7 +101,7 @@ public final class VersionChecker implements Runnable
|
||||
catch( final Exception exception )
|
||||
{
|
||||
// Log any unhandled exception to prevent the JVM from reporting them as unhandled.
|
||||
AELog.error( exception );
|
||||
AELog.debug( exception );
|
||||
}
|
||||
|
||||
AELog.info( "Stopping AE2 VersionChecker" );
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -67,7 +67,7 @@ public final class ModVersionFetcher implements VersionFetcher
|
||||
}
|
||||
catch( final VersionCheckerException e )
|
||||
{
|
||||
AELog.error( e );
|
||||
AELog.debug( e );
|
||||
|
||||
return EXCEPTIONAL_VERSION;
|
||||
}
|
||||
|
||||
@@ -75,15 +75,15 @@ public final class ReleaseFetcher
|
||||
}
|
||||
catch( final VersionCheckerException e )
|
||||
{
|
||||
AELog.error( e );
|
||||
AELog.debug( e );
|
||||
}
|
||||
catch( final MalformedURLException e )
|
||||
{
|
||||
AELog.error( e );
|
||||
AELog.debug( e );
|
||||
}
|
||||
catch( final IOException e )
|
||||
{
|
||||
AELog.error( e );
|
||||
AELog.debug( e );
|
||||
}
|
||||
|
||||
return EXCEPTIONAL_RELEASE;
|
||||
|
||||
Reference in New Issue
Block a user