Skip to content

Open-source event management and ticket selling platform — perfect for concerts, conferences, and everything in between 🎟️ If you find this project helpful, please consider giving us a star ⭐️

Disable query logging by default

Dave Earleyb2ffeafb978d
diff --git a/backend/.env.example b/backend/.env.example
index 589e9b82b..1ebe5d5cc 100644
--- a/backend/.env.example
+++ b/backend/.env.example
@@ -2,6 +2,7 @@ APP_NAME=Hi.Events
APP_ENV=local
APP_KEY=base64:DwMidgIu8YVSEg0BLMrh5JS2dk1POpCn3rvDaZk3fEQ=
APP_DEBUG=true
+APP_LOG_QUERIES=false
APP_URL=http://localhost
APP_PORT=1234
APP_FRONTEND_URL=https://localhost:8443
diff --git a/backend/app/Providers/AppServiceProvider.php b/backend/app/Providers/AppServiceProvider.php
index a4d333a34..ace64af33 100644
--- a/backend/app/Providers/AppServiceProvider.php
+++ b/backend/app/Providers/AppServiceProvider.php
@@ -29,7 +29,7 @@ class AppServiceProvider extends ServiceProvider
*/
public function boot(): void
{
- if (env('APP_DEBUG') === true) {
+ if (env('APP_DEBUG') === true && env('APP_LOG_QUERIES') === true && !app()->isProduction()) {
DB::listen(
static function ($query) {
File::append(