-
-
Notifications
You must be signed in to change notification settings - Fork 233
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: bunslog.QueryHook for Bun logging using log/slog
#904
feat: bunslog.QueryHook for Bun logging using log/slog
#904
Conversation
5f67437
to
1e9ccf6
Compare
@hirasawayuki Looks good, thanks. Could you add a |
1e9ccf6
to
1b05a16
Compare
1b05a16
to
433ad6c
Compare
@vmihailenco
(It appears that the build is failing for Go 1.19 and Go 1.20 due to the import of log/slog. Would it be a good idea to also modify the Makefile to avoid loading it during the build?) |
Let's just bump Go in tests to v1.21. |
Thanks! |
Description
This PR implements a new package called bunslog to support enhanced logging functionalities for the Bun using
log/slog
.ref #903
Features
*slog.Logger
instance or uses the global logger if not set.Usage
Simply create a new QueryHook and add it to existing
*db.Bun
database instance.