Disable query output #291
-
Hi guys, could you tell me how to disable SQL logging to the console, which like:
Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
It depends on your logger, but this is how I do it: Builder::new()
.filter_level(log::LevelFilter::Info)
.filter_module("sqlx::query", log::LevelFilter::Off)
.init(); (I'm using the log crate with env_logger) |
Beta Was this translation helpful? Give feedback.
-
https://docs.rs/sea-orm/0.3.2/src/sea_orm/database/mod.rs.html#40 Apparently I forgot to expose a public method for it. Will do that soon. Thanks @AngelOnFira ! His suggestion works too and is actually more flexible as it allows the consumer to make the decision instead of the producer. |
Beta Was this translation helpful? Give feedback.
-
Actually, we later added a |
Beta Was this translation helpful? Give feedback.
It depends on your logger, but this is how I do it:
(I'm using the log crate with env_logger)