Issue
I have a following snippet code in a Controller:
echo 'something';
So, I need to show it on console listener that I created with:
tail -f storage/logs/laravel.log
I've tried so many things:
\Log::info('info');
\Log::warning('warning');
\Log::error('error');
\Log::debug('debug');
error_log('something log');
I have configured AppServiceProvider.php
public function boot()
{
//
error_reporting(E_ALL & E_NOTICE);
}
In config/app.php, I have:
'debug' => env('APP_DEBUG', true),
Nothing works!
What else do I need to do?
Solution
Finally, I found a solution.
I'm using AWS and some logs are in /var/log/nginx.
I entered the folder and there's many file as prefix "error_log", one for each application.
So, I did:
sudo tail -f error_log_myapplication.log
to open console listener.
Then, I wrote error_log('my message')
in Controller and call my request.
That's it!
Answered By - jbernardo
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.