influxdb-java
influxdb-java copied to clipboard
It should be possible to not log errors in BatchProcessor
The current exception handler implementation doesn't make it possible to completely eliminate logging of errors. You can add an additional error handler, but LOG.log(Level.SEVERE, "Batch could not be sent. Data will be lost", t);
will still be run no matter what. We would like to only log errors periodically so we don't completely spam our logs from all servers if InfluxDB goes down temporarily.
Could the default logging be implemented as a default exception handler that can be replaced or enhanced? I could turn off the logging, but that would mean disabling all logging from this class.
Another option would be to allow for turning down the log level of these errors, maybe to DEBUG or some other setting less than error.
@jjathman if you make a PR we will review it.
I had this request come across my desk this morning also. Basically how can we limit the amount of noise being generated if we loose the ability to write to the influx?