Skip to content

Commit

Permalink
Node: Log fatal not making it to grafana (#4063)
Browse files Browse the repository at this point in the history
  • Loading branch information
bruce-riley authored Aug 6, 2024
1 parent 7bf815e commit 46bcc70
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 46bcc70

Please sign in to comment.