Skip to content

Commit

Permalink
Reduce error logging if reconnect is disabled (fluent#16).
Browse files Browse the repository at this point in the history
  • Loading branch information
Russell Melick committed Apr 21, 2016
1 parent 0e21d8b commit 5aba277
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/fluentd/logger/sender/RawSocketSender.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ private boolean flushBuffer() {
flush();
if (pendings.position() == 0) {
return true;
} else {
LOG.error("Cannot send logs to " + server.toString());
}
}

Expand All @@ -162,7 +164,6 @@ private synchronized boolean send(byte[] bytes) {
// buffering
if (pendings.position() + bytes.length > pendings.capacity()) {
if (!flushBuffer()) {
LOG.error("Cannot send logs to " + server.toString());
return false;
}
}
Expand Down

0 comments on commit 5aba277

Please sign in to comment.