Skip to content

Commit 597291e

Browse files
authored
Change log level of EOF errors in loki.source.syslog (#4590)
1 parent b11d6e1 commit 597291e

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ Main (unreleased)
5151

5252
- Fix direction of arrows for pyroscope components in UI graph. (@dehaansa)
5353

54+
- Only log EOF errors for syslog port investigations in `loki.source.syslog` as Debug, not Warn. (@dehaansa)
55+
5456
v1.11.2
5557
-----------------
5658

internal/component/loki/source/syslog/internal/syslogtarget/transport.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,11 @@ func (t *TCPTransport) handleConnection(cn net.Conn) {
331331
}, t.maxMessageLength())
332332

333333
if err != nil {
334-
level.Warn(t.logger).Log("msg", "error initializing syslog stream", "err", err)
334+
if err == io.EOF {
335+
level.Debug(t.logger).Log("msg", "syslog connection closed", "remote", c.RemoteAddr().String())
336+
} else {
337+
level.Warn(t.logger).Log("msg", "error initializing syslog stream", "err", err)
338+
}
335339
}
336340
}
337341

0 commit comments

Comments
 (0)