Skip to content

Commit

Permalink
Log when rotation of log files failed
Browse files Browse the repository at this point in the history
  • Loading branch information
spacecowboy committed Feb 22, 2017
1 parent cccc1b2 commit ad67157
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,22 @@ public void outputFileCreated( OutputStream newStream, OutputStream oldStream )
FormattedLogProvider logProvider = internalLogBuilder.toOutputStream( newStream );
logProvider.getLog( StoreLogService.class ).info( "Opened new internal log file" );
rotationListener.accept( logProvider );
}

@Override
public void rotationCompleted( OutputStream newStream, OutputStream oldStream )
{
FormattedLogProvider logProvider = internalLogBuilder.toOutputStream( newStream );
logProvider.getLog( StoreLogService.class ).info( "Rotated internal log file" );
}

@Override
public void rotationError( @SuppressWarnings( "unused" ) Exception e,
@SuppressWarnings( "unused" ) OutputStream outStream )
{
FormattedLogProvider logProvider = internalLogBuilder.toOutputStream( outStream );
logProvider.getLog( StoreLogService.class ).info( "Rotation of internal log file failed:", e );
}
} );
internalLogProvider = internalLogBuilder.toOutputStream( rotatingSupplier );
this.closeable = rotatingSupplier;
Expand Down

0 comments on commit ad67157

Please sign in to comment.