Skip to content

Commit

Permalink
Fix: qe to debug mongo db queries in standalone engine
Browse files Browse the repository at this point in the history
Fixes prisma/prisma#15084

The logging logic should be consolidated and abstracted away
  • Loading branch information
miguelff committed Oct 20, 2022
1 parent b933adf commit 05e77fc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion query-engine/query-engine/src/logger.rs
Expand Up @@ -142,7 +142,9 @@ fn create_env_filter(log_queries: bool) -> EnvFilter {
}

if log_queries {
filter = filter.add_directive("quaint[{is_query}]=trace".parse().unwrap());
// even when mongo queries are logged in debug mode, we want to log them if the log level is higher
filter = filter.add_directive("quaint[{is_query}]=trace".parse().unwrap())
.add_directive(format!("mongodb_query_connector=debug").parse().unwrap());
}

filter
Expand Down

0 comments on commit 05e77fc

Please sign in to comment.