Skip to content

Commit

Permalink
Not to log class name
Browse files Browse the repository at this point in the history
Now, the log message contains the class name:
  2021-12-19 22:59:31,787 ERROR [main] org.fluentd.logger.sender.RawSocketSender
  java.net.ConnectException: Connection refused (Connection refused)

Since log frameworks usually have a way to log class name without the
need to include it in the log message, the class name should be removed.
The following text shows a sample log mesage after this change:

  2021-12-19 22:56:58,842 ERROR [main] flush failed
  java.net.ConnectException: Connection refused (Connection refused)

Signed-off-by: Jingguo Yao <[email protected]>
  • Loading branch information
yaojingguo committed Dec 19, 2021
1 parent 2e5fdf2 commit 4b5b865
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public synchronized void flush() {
catch (Exception handlerException) {
LOG.warn("ErrorHandler.handleNetworkError failed", handlerException);
}
LOG.error(this.getClass().getName(), "flush", e);
LOG.error("flush failed", e);
reconnector.addErrorHistory(System.currentTimeMillis());
close();
}
Expand Down

0 comments on commit 4b5b865

Please sign in to comment.