fluent-logger-scala icon indicating copy to clipboard operation
fluent-logger-scala copied to clipboard

org.fluentd.logger.sender.RawSocketSender java.net.ConnectException: Connection refused

Open SwathiKak opened this issue 3 years ago • 0 comments

ScalaRawSocketSender -> open() shows exceptions with stacktrace when failed to connect to server. The behavior itself seems to have no problem. However, it is confusing in production and during tests. Observed "printStackTrace" message when server refused to connect. Could we suppress it please in production code 0.7.0 versionon-wards?

Reference Code: def open(): Unit = { try { connect() } catch { case e: IOException => LOG.severe(s"Failed to connect fluentd: $server") LOG.severe("Connection will be retried") e.printStackTrace() close() } }

SwathiKak avatar Aug 13 '22 01:08 SwathiKak