Skip to content

Commit

Permalink
ignore errors when the logging node empties the log buffer (#6558)
Browse files Browse the repository at this point in the history
  • Loading branch information
wildum authored Feb 29, 2024
1 parent de6a693 commit b691a44
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ Main (unreleased)

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

### Bugfixes

- Fix an issues where the logging config block would trigger an error when trying to send logs to components that were not running. (@wildum)

v0.40.0 (2024-02-27)
--------------------

Expand Down
6 changes: 3 additions & 3 deletions pkg/flow/logging/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ func (l *Logger) Update(o Options) error {

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

Expand Down

0 comments on commit b691a44

Please sign in to comment.