private void afterRecord() {
        if (fileNamePattern != null && getRecordCounter() % splitlimit == 0) {
            try {
                endCollection();
                writer.close();
                newWriter(fileNamePattern, fileNameCounter, bufferSize, compress);
                setupEventConsumer(writer, indent);
                beginCollection();
            } catch (IOException e) {
                logger.log(Level.SEVERE, e.getMessage(), e);
            }
        }
    }
private void afterRecord ( ) { if ( fileNamePattern != null && getRecordCounter ( ) % splitlimit == 0 ) { try { endCollection ( ) ; writer . close ( ) ; newWriter ( fileNamePattern , fileNameCounter , bufferSize , compress ) ; setupEventConsumer ( writer , indent ) ; beginCollection ( ) ; } catch ( IOException e ) { logger . log ( Level . SEVERE , e . getMessage ( ) , e ) ; } } }
Split records if configured.