Closed ws256 closed 1 month ago
You have a couple of ways to achieve that, @ws256:
You can use the ep_query_logger_queries_to_keep
filter to make it never log anything:
add_filter( 'ep_query_logger_queries_to_keep', '__return_zero' );
You can also use the ep_query_logger_should_log_query
to decide if a query should or should not be logged. See this line of code to see how the filter works.
If you want to change how the query logging mechanism works, you can replace the default QueryLogger object instance with something custom, using the ep_query_logger
filter. This is the related line.
Describe your question
Hello! How to disable query logging? I have some requests with a time exceeding 5s. I can’t repeat it, but 10+ requests per day are written to the log. If you try to repeat the request, it will be completed quickly. I don't know why they are fixed. Example: Time Spent (ms) 5003.54790687561
Code of Conduct