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

Use the log crate instead of "debug-print" feature #114

Closed
tqwewe opened this issue Aug 27, 2021 · 1 comment · Fixed by #123
Closed

Use the log crate instead of "debug-print" feature #114

tqwewe opened this issue Aug 27, 2021 · 1 comment · Fixed by #123
Assignees

Comments

@tqwewe
Copy link
Contributor

tqwewe commented Aug 27, 2021

Currently SeaORM uses a feature flag called "debug-print" which simple executes a println with the query.

It might be nice to use the "log" / "env-logger" crates instead.

For example, replace

debug_print!("{}", stmt);

with

info!(target: "sea-orm-query", "{}", stmt);

The benefit of this is that apps using SeaORM can change logging through env vars rather than recompiling with a new feature flag.
For example:

$ RUST_LOG=sea-orm-query=info ./main
@tyt2y3
Copy link
Member

tyt2y3 commented Aug 28, 2021

Yes, I agree. It will be very helpful at deployment!

@tyt2y3 tyt2y3 added this to the 0.2.0 milestone Sep 2, 2021
@billy1624 billy1624 self-assigned this Sep 2, 2021
@billy1624 billy1624 mentioned this issue Sep 2, 2021
@billy1624 billy1624 mentioned this issue Sep 3, 2021
11 tasks
billy1624 added a commit to SeaQL/seaql.github.io that referenced this issue Sep 17, 2021
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

Successfully merging a pull request may close this issue.

3 participants