influxdb-java icon indicating copy to clipboard operation
influxdb-java copied to clipboard

It should be possible to not log errors in BatchProcessor

Open jjathman opened this issue 7 years ago • 2 comments

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 avatar Dec 19 '17 16:12 jjathman

@jjathman if you make a PR we will review it.

fmachado avatar Jan 03 '18 13:01 fmachado

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?

larrywalker avatar May 03 '18 15:05 larrywalker