class LoggingListener implements TableReplicationListener, LocomotiveListener, SourceCatalogListener,
    ReplicaCatalogListener, CopierListener {

  @Override
  public void tableReplicationFailure(EventTableReplication tableReplication, String eventId, Throwable t) {
    if (sourceCatalog != null && replicaCatalog != null) {
      LOG
          .error("[{}] Failed to replicate '{}:{}' to '{}:{}' with error '{}'", eventId, sourceCatalog.getName(),
              tableReplication.getSourceTable().getQualifiedName(), replicaCatalog.getName(),
              tableReplication.getQualifiedReplicaName(), t.getMessage());
    }
  }

}