Skip to content

Commit b691a44

Browse files
authored
ignore errors when the logging node empties the log buffer (#6558)
1 parent de6a693 commit b691a44

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ Main (unreleased)
1717

1818
- A new `loki.rules.kubernetes` component that discovers `PrometheusRule` Kubernetes resources and loads them into a Loki Ruler instance. (@EStork09)
1919

20+
### Bugfixes
21+
22+
- Fix an issues where the logging config block would trigger an error when trying to send logs to components that were not running. (@wildum)
23+
2024
v0.40.0 (2024-02-27)
2125
--------------------
2226

pkg/flow/logging/logger.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ func (l *Logger) Update(o Options) error {
126126

127127
// Print out the buffered logs since we determined the log format already
128128
for _, bufferedLogChunk := range l.buffer {
129-
if err := slogadapter.GoKit(l.handler).Log(bufferedLogChunk...); err != nil {
130-
return err
131-
}
129+
// the buffered logs are currently only sent to the standard output
130+
// because the components with the receivers are not running yet
131+
slogadapter.GoKit(l.handler).Log(bufferedLogChunk...)
132132
}
133133
l.buffer = nil
134134

0 commit comments

Comments
 (0)