Skip to content

Conversation

@willtj
Copy link

@willtj willtj commented Apr 12, 2021

@trybeapp/tech FYI in case you were used to going to QueryGrammar and hackily un-commenting the print_r there, like I was 😳 . New way:

\Illuminate\Support\Facades\DB::connection('elasticsearch')->enableQueryLog();
...
\Illuminate\Support\Facades\DB::connection('elasticsearch')-> dumpQueryLogJson();

This will print all logged queries in JSON format that can be posted directly to Elasticsearch for debugging.

@willtj willtj merged commit 525fdff into master Apr 12, 2021
@willtj willtj deleted the dump-query branch April 12, 2021 19:54
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 this pull request may close these issues.

2 participants