Logging A Massage Php

[Solved] Logging A Massage Php | Php - Code Explorer | yomemimo.com
Question : Logging a Massage php

Answered by : jarno-looij

use Psr\Log\LoggerInterface;
public function index(LoggerInterface $logger)
{ $logger->info('I just got the logger'); $logger->error('An error occurred'); $logger->critical('I left the oven on!', [ // include extra "context" info in your logs 'cause' => 'in_hurry', ]); // ...
}

Source : https://symfony.com/doc/current/logging.html | Last Update : Wed, 06 Apr 22

Answers related to logging a massage php

Code Explorer Popular Question For Php