Summer Sale! All accounts are 50% off this week.

NielsNumbers's avatar

How to print logs during tests?

I run my tests sometimes on console like sail test --filter=SomeSpecialTest. I would like to see the logs that are created by the Log::info(..) facade directly on terminal. Is this possible?

0 likes
1 reply
tisuchi's avatar

@elenktik Does it work for you?

Log::info('This is a log message');

Then use --verbose during running the test.

php artisan test --filter=SomeSpecialTest --verbose
1 like

Please or to participate in this conversation.