Skip to content

Commit

Permalink
Node: Log fatal not making it to grafana
Browse files Browse the repository at this point in the history
  • Loading branch information
bruce-riley committed Aug 6, 2024
1 parent e351236 commit f5e2ef6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions node/pkg/telemetry/loki.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ func (logger *ExternalLoggerLoki) log(time time.Time, message json.RawMessage, l
}

logger.c.Chan() <- entry

// A fatal error exits, which can cause us to lose messages. Flush everything.
if level == zapcore.FatalLevel {
logger.c.StopNow()
}
}

func (logger *ExternalLoggerLoki) close() error {
Expand Down

0 comments on commit f5e2ef6

Please sign in to comment.