Skip to content

Replace Logger interface with slog.Logger #182

Description

@iwarapter

The current log implementation uses a custom interface to expose a logger:

// Logger defines an interface for logging errors.
type Logger interface {
	Error(args ...interface{})
}

type noopLogger struct{}

func (noopLogger) Error(...interface{}) {}

With go 1.21 a structured log package was introduced - https://go.dev/blog/slog

Would you accept a PR that swaps out the existing logger for a *slog.Logger and updating all the relevant internal calls to be context based. I'm happy to work on this if it's likely to be accepted.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions