Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(zapslog): implement stack trace handling #1339

Merged
merged 18 commits into from
Sep 1, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Handler.Handle: Inline zapLevel back
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
commit 31b7f037b1b6727364046de760878519ee8b8608
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