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

Improve logging support #131

Open
khvn26 opened this issue Jun 20, 2024 · 1 comment
Open

Improve logging support #131

khvn26 opened this issue Jun 20, 2024 · 1 comment
Assignees

Comments

@khvn26
Copy link
Member

khvn26 commented Jun 20, 2024

Golang's logging ecosystem is vast, and users expect various logging models to be supported. For instance, one of our enterprise customers expects slog support. Currently, the package expects a Logger interface passed as means to log its events. Apparently this is not flexible enough.

Options to consider:

  1. Remove logging altogether; return errors where appropriate.
  2. Add explicit support for slog by adding a SetHandler method.
  3. Simplify expected logger dependency by accepting a logFn function with one msg argument. Have a null logger as default.
@khvn26 khvn26 self-assigned this Jun 20, 2024
@khvn26
Copy link
Member Author

khvn26 commented Jun 27, 2024

After a chat with a customer we're leaning towards option number 2 as other logging implementations are supposed to be easily wrappable with slog.

We're keeping in mind, however, that the package does very little logging and it's easy to remove completely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant