Skip to content

Commit 5aba277

Browse files
author
Russell Melick
committed
Reduce error logging if reconnect is disabled (#16).
1 parent 0e21d8b commit 5aba277

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/org/fluentd/logger/sender/RawSocketSender.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ private boolean flushBuffer() {
152152
flush();
153153
if (pendings.position() == 0) {
154154
return true;
155+
} else {
156+
LOG.error("Cannot send logs to " + server.toString());
155157
}
156158
}
157159

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

0 commit comments

Comments
 (0)