public void setLogFailuresOnly(boolean logFailuresOnly) {
        this.logFailuresOnly = logFailuresOnly;
    }
Defines whether the producer should fail on errors, or only log them. If this is set to true,
then exceptions will be only logged, if set to false, exceptions will be eventually thrown
and cause the streaming program to fail (and enter recovery).

@param logFailuresOnly The flag to indicate logging-only on exceptions.
inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/kafka/src/main/java/org/apache/inlong/sort/kafka/FlinkKafkaProducer.java