Skip to content

Commit

Permalink
Merge pull request AppliedEnergistics#2010 from yueh/feature-logger-r…
Browse files Browse the repository at this point in the history
…efactoring

Refactored the logging
  • Loading branch information
yueh committed Dec 27, 2015
2 parents 684cda5 + c9ef1be commit 17bdd08
Show file tree
Hide file tree
Showing 71 changed files with 529 additions and 205 deletions.
2 changes: 1 addition & 1 deletion src/main/java/appeng/client/ClientHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ public void wheelEvent( final MouseEvent me )
}
catch( final IOException e )
{
AELog.error( e );
AELog.debug( e );
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/appeng/client/gui/AEBaseGui.java
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ protected void handleMouseClick( final Slot slot, final int slotIdx, final int c
}
catch( final IOException e )
{
AELog.error( e );
AELog.debug( e );
}
}
else if( slot instanceof SlotCraftingTerm )
Expand Down Expand Up @@ -779,7 +779,7 @@ private void drawSlot( final Slot s )
}
catch( final Exception err )
{
AELog.warning( "[AppEng] AE prevented crash while drawing slot: " + err.toString() );
AELog.warn( "[AppEng] AE prevented crash while drawing slot: " + err.toString() );
}
this.setItemRender( pIR );
return;
Expand Down Expand Up @@ -846,7 +846,7 @@ private void drawSlot( final Slot s )
}
catch( final Exception err )
{
AELog.error( err );
AELog.debug( err );
}
}
( (AppEngSlot) s ).setIsValid( isValid ? hasCalculatedValidness.Valid : hasCalculatedValidness.Invalid );
Expand Down Expand Up @@ -880,7 +880,7 @@ private void drawSlot( final Slot s )
}
catch( final Exception err )
{
AELog.warning( "[AppEng] AE prevented crash while drawing slot: " + err.toString() );
AELog.warn( "[AppEng] AE prevented crash while drawing slot: " + err.toString() );
}
}
// do the usual for non-ME Slots.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ protected void actionPerformed( final GuiButton btn )
}
catch( final IOException e )
{
AELog.error( e );
AELog.debug( e );
}
}

Expand All @@ -573,7 +573,7 @@ protected void actionPerformed( final GuiButton btn )
}
catch( final Throwable e )
{
AELog.error( e );
AELog.debug( e );
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ protected void actionPerformed( final GuiButton btn )
}
catch( final IOException e )
{
AELog.error( e );
AELog.debug( e );
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ protected void actionPerformed( final GuiButton btn )
}
catch( final IOException e )
{
AELog.error( e );
AELog.debug( e );
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ private void addQty( final long i )
}
catch( final IOException e )
{
AELog.error( e );
AELog.debug( e );
}
}

Expand Down Expand Up @@ -269,7 +269,7 @@ protected void keyTyped( final char character, final int key )
}
catch( final IOException e )
{
AELog.error( e );
AELog.debug( e );
}
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ else if( btn == this.searchBoxSettings )
}
catch( final IOException e )
{
AELog.error( e );
AELog.debug( e );
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ protected void actionPerformed( final GuiButton btn )
}
catch( final IOException e )
{
AELog.error( e );
AELog.debug( e );
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ private void addQty( final int i )
}
catch( final IOException e )
{
AELog.error( e );
AELog.debug( e );
}
}

Expand Down Expand Up @@ -276,7 +276,7 @@ protected void keyTyped( final char character, final int key )
}
catch( final IOException e )
{
AELog.error( e );
AELog.debug( e );
}
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ protected void keyTyped( final char character, final int key )
}
catch( final IOException e )
{
AELog.error( e );
AELog.debug( e );
}
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ protected void actionPerformed( final net.minecraft.client.gui.GuiButton btn )
}
catch( final IOException e )
{
AELog.error( e );
AELog.debug( e );
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ else if( btn == this.storageFilter )
}
catch( final IOException e )
{
AELog.error( e );
AELog.debug( e );
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public boolean renderStandardBlock( final Block blk, final int x, final int y, f
}
catch( final Throwable t )
{
AELog.error( t );
AELog.debug( t );
// meh
}
return false;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/appeng/client/render/TESRWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ public final void renderTileEntityAt( final TileEntity te, final double x, final
}
catch( final Throwable t )
{
AELog.severe( "Hi, Looks like there was a crash while rendering something..." );
AELog.error( "Hi, Looks like there was a crash while rendering something..." );
t.printStackTrace();
AELog.severe( "MC will now crash ( probably )!" );
AELog.error( "MC will now crash ( probably )!" );
throw new IllegalStateException( t );
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/appeng/client/render/WorldRender.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ void renderItemBlock( final ItemStack item, final ItemRenderType type, final Obj
if( !this.hasError )
{
this.hasError = true;
AELog.severe( "Invalid render - item/block mismatch" );
AELog.severe( " item: " + item.getUnlocalizedName() );
AELog.severe( " block: " + blk.getUnlocalizedName() );
AELog.error( "Invalid render - item/block mismatch" );
AELog.error( " item: " + item.getUnlocalizedName() );
AELog.error( " block: " + blk.getUnlocalizedName() );
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public void renderTile( final BlockCharger block, final TileCharger tile, final
}
catch( final Exception err )
{
AELog.error( err );
AELog.debug( err );
}
finally
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ private void tesrRenderScreen( final Tessellator tess, final TileCraftingMonitor
}
catch( final Exception e )
{
AELog.error( e );
AELog.debug( e );
}
finally
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ private void renderItem( ItemStack sis, final float o, final AEBaseBlock block,
}
catch( final Exception err )
{
AELog.error( err );
AELog.debug( err );
}

GL11.glPopMatrix();
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/appeng/container/AEBaseContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ private void prepareSync()
final GuiSync annotation = f.getAnnotation( GuiSync.class );
if( this.syncData.containsKey( annotation.value() ) )
{
AELog.warning( "Channel already in use: " + annotation.value() + " for " + f.getName() );
AELog.warn( "Channel already in use: " + annotation.value() + " for " + f.getName() );
}
else
{
Expand Down Expand Up @@ -208,7 +208,7 @@ private void parsePartials()
}
catch( final IOException e )
{
AELog.error( e );
AELog.debug( e );
}

this.dataChunks.clear();
Expand Down Expand Up @@ -270,7 +270,7 @@ public void setTargetStack( final IAEItemStack stack )
}
catch( final IOException e )
{
AELog.error( e );
AELog.debug( e );
return;
}
}
Expand Down Expand Up @@ -1109,7 +1109,7 @@ protected void updateHeld( final EntityPlayerMP p )
}
catch( final IOException e )
{
AELog.error( e );
AELog.debug( e );
}
}
}
Expand Down Expand Up @@ -1178,7 +1178,7 @@ private void sendCustomName()
}
catch( final IOException e )
{
AELog.error( e );
AELog.debug( e );
}
}
}
Expand Down
18 changes: 9 additions & 9 deletions src/main/java/appeng/container/guisync/SyncData.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ else if( !val.equals( this.clientVersion ) )
}
catch( final IllegalArgumentException e )
{
AELog.error( e );
AELog.debug( e );
}
catch( final IllegalAccessException e )
{
AELog.error( e );
AELog.debug( e );
}
catch( final IOException e )
{
AELog.error( e );
AELog.debug( e );
}
}

Expand Down Expand Up @@ -127,11 +127,11 @@ public void update( final Object val )
}
catch( final IllegalArgumentException e )
{
AELog.error( e );
AELog.debug( e );
}
catch( final IllegalAccessException e )
{
AELog.error( e );
AELog.debug( e );
}
}

Expand All @@ -143,11 +143,11 @@ private void updateString( final Object oldValue, final String val )
}
catch( final IllegalArgumentException e )
{
AELog.error( e );
AELog.debug( e );
}
catch( final IllegalAccessException e )
{
AELog.error( e );
AELog.debug( e );
}
}

Expand Down Expand Up @@ -199,11 +199,11 @@ else if( this.field.getType().equals( Boolean.class ) )
}
catch( final IllegalArgumentException e )
{
AELog.error( e );
AELog.debug( e );
}
catch( final IllegalAccessException e )
{
AELog.error( e );
AELog.debug( e );
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ public void detectAndSendChanges()
catch( final Throwable e )
{
this.getPlayerInv().player.addChatMessage( new ChatComponentText( "Error: " + e.toString() ) );
AELog.error( e );
AELog.debug( e );
this.setValidContainer( false );
this.result = null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ protected void setCPU( final ICraftingCPU c )
}
catch( final IOException e )
{
AELog.error( e );
AELog.debug( e );
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public void detectAndSendChanges()
}
catch( final IOException e )
{
AELog.error( e );
AELog.debug( e );
}
}
}
Expand Down Expand Up @@ -237,7 +237,7 @@ public void detectAndSendChanges()
}
catch( final IOException e )
{
AELog.error( e );
AELog.debug( e );
}
}

Expand Down Expand Up @@ -335,7 +335,7 @@ private void queueInventory( final ICrafting c )
}
catch( final IOException e )
{
AELog.error( e );
AELog.debug( e );
}
}
}
Expand Down
Loading

0 comments on commit 17bdd08

Please sign in to comment.