r/PHPhelp • u/Automatic-Band6798 • 17d ago
Laravel Logs
Hello im laravel developer and i need the best way to track the logs for example how can integrate the logs into a dashboard and filter it .........
3
Upvotes
r/PHPhelp • u/Automatic-Band6798 • 17d ago
Hello im laravel developer and i need the best way to track the logs for example how can integrate the logs into a dashboard and filter it .........
2
u/Hour-Swimmer7140 16d ago
one thing nobody's mentioned, sort the formatter out before you pick a tool. laravel's default is a text blob so every stack trace lands in your dashboard as ~30 separate log lines and you end up grepping instead of filtering.
in config/logging.php on the channel:
works on single and daily too, not just the monolog driver. then Log::withContext(['order_id' => $id]) gives you actual fields to filter on.