Category : logging

I monitor my local Laravel logs by doing this : tail -f storage/logs/laravel.log | grep .ERROR: [2020-11-29 08:46:01] local.ERROR: SQLSTATE[HY000] [2002] Connection refused (SQL: select `color_code`, `name` from `skills` order by `created_at` desc) {"exception":"[object] (IlluminateDatabaseQueryException(code: 2002): SQLSTATE[HY000] [2002] Connection refused (SQL: select `color_code`, `name` from `skills` order by `created_at` desc) at /Users/hunter/Sites/app/vendor/laravel/framework/src/Illuminate/Database/Connection.php:671) Rather than keep ..

Read more

So i am trying to log an event (if it’s not successful), but I am always getting this error Call to undefined method MonologLogger::single() This is my code for a controller in the app/console/commands directory. <?php namespace AppConsoleCommands; use IlluminateConsoleCommand; use SymfonyComponentProcessExceptionProcessFailedException; use SymfonyComponentProcessProcess; use IlluminateSupportFacadesLog; class FPTrainCommand extends Command { /** * The name ..

Read more

I am trying to integrate NewRelic Logs to a Laravel application which uses Monolog by default. I have currently configured a NewRelic handler which allows me to log almost everything to NewRelic however I have noticed that Artisan commands which print to stdout or stderr do not get captured by NewRelic Logs. Is there any ..

Read more

I wrote in controller like this try { $this->notice->create($notice); } catch (Exception $exception) { return response()->json([‘result’ => false, ‘message’ => ‘Error.’], 409); } but in "laravel-xxxx-xx-xx.log" file, There wasn’t happened anything. Of course, I found this try { $this->notice->create($notice); } catch (Exception $exception) { Log::error($exception); return response()->json([‘result’ => false, ‘message’ => ‘Error.’], 409); } but ..

Read more

I am working in Laravel v6.18 project for client. Now randomly when I try to submit form with quite an amount of data, I am getting the error as below: [2020-09-17 10:05:23] local.ERROR: IlluminateValidationValidationException: The given data was invalid. in C:network-sitesvendorlaravelframeworksrcIlluminateFoundationHttpFormRequest.php:130 Stack trace: …. I know this is a generic error message created to hide ..

Read more