Skip to content

Commit

Permalink
Handler.Handle: Inline zapLevel back
Browse files Browse the repository at this point in the history
Now that zaplevel isn't used to determine if we need to capture the
stack trace, it can be inlined back into the entry construction.
  • Loading branch information
abhinav committed Aug 27, 2023
1 parent 41948fb commit 31b7f03
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions exp/zapslog/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,8 @@ func (h *Handler) Enabled(ctx context.Context, level slog.Level) bool {

// Handle handles the Record.
func (h *Handler) Handle(ctx context.Context, record slog.Record) error {
zapLevel := convertSlogLevel(record.Level)
ent := zapcore.Entry{
Level: zapLevel,
Level: convertSlogLevel(record.Level),
Time: record.Time,
Message: record.Message,
LoggerName: h.name,
Expand Down

0 comments on commit 31b7f03

Please sign in to comment.