mnabialek / laravel-sql-logger

Log SQL queries for Laravel/Lumen framework
MIT License
156 stars 24 forks source link

Bind Context Request_id to sql log #29

Closed Oranzh closed 3 years ago

Oranzh commented 3 years ago

I have made this middleware to my project, so laravel's log has one unique request id, but I hope the sql file have the same one request_id, so I think I will check one client request is easier! How do I can to this ? Thanks for ur time!

`class AssignRequestId { /**

Now only the laravel log has request_id. image

mnabialek commented 3 years ago

Hi @Oranzh Unfortunately this package doesn't support using Log. In addition withContext method was introduced in Laravel 8 so it I have to delay handling it. Also remember that using this package in production is not really recommended. This package is intended for local/dev usage to track number of queries.