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 21, 2022
1 parent 873cfc1 commit 12d17f6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion query-engine/query-engine/src/logger.rs
Expand Up @@ -142,7 +142,10 @@ 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("mongodb_query_connector=debug".parse().unwrap());
}

filter
Expand Down

0 comments on commit 12d17f6

Please sign in to comment.