Skip to content

Commit

Permalink
add logger name to logrus integration
Browse files Browse the repository at this point in the history
  • Loading branch information
ribice committed Jul 28, 2024
1 parent c6c965c commit b5b190d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions logrus/logrusentry.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (

// The identifier of the Logrus SDK.
const sdkIdentifier = "sentry.go.logrus"
const name = "logrus"

// These default log field keys are used to pass specific metadata in a way that
// Sentry understands. If they are found in the log fields, and the value is of
Expand Down Expand Up @@ -153,6 +154,7 @@ func (h *Hook) entryToEvent(l *logrus.Entry) *sentry.Event {
Extra: data,
Message: l.Message,
Timestamp: l.Time,
Logger: name,
}
key := h.key(FieldRequest)
if req, ok := s.Extra[key].(*http.Request); ok {
Expand Down

0 comments on commit b5b190d

Please sign in to comment.