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

Implement structured JSON logger #142

Closed
wneessen opened this issue Aug 23, 2023 · 0 comments · Fixed by #143
Closed

Implement structured JSON logger #142

wneessen opened this issue Aug 23, 2023 · 0 comments · Fixed by #143
Assignees
Labels
enhancement New feature or request WIP Work is in progress

Comments

@wneessen
Copy link
Owner

Is your feature request related to a problem? Please describe.

No

Describe the solution you'd like

With the addition of log/slog to the std lib, we can add an additional standard logger to the go-mail log package, that allows structured logging in JSON formatting.

Describe alternatives you've considered

No response

Additional context

No response

@wneessen wneessen added the enhancement New feature or request label Aug 23, 2023
@wneessen wneessen self-assigned this Aug 23, 2023
@wneessen wneessen added the WIP Work is in progress label Aug 23, 2023
wneessen added a commit that referenced this issue Aug 23, 2023
This commit introduces a new type 'JSONlog' that satisfies the Logger interface for structured JSON logging. This includes new methods 'Debugf', 'Infof', 'Warnf' and 'Errorf' to log messages at different levels and an associated test 'jsonlog_test.go' to ensure correct functionality. This enhances the logging functionality by providing clarity in logs and eases debugging process.
@wneessen wneessen linked a pull request Aug 23, 2023 that will close this issue
wneessen added a commit that referenced this issue Aug 23, 2023
…d-json-logger

#142 Add structured JSON logger and associated tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request WIP Work is in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant