Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Logging a Massage php

use PsrLogLoggerInterface;

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 by symfony.com #
 
PREVIOUS NEXT
Tagged: #Logging #Massage #php
ADD COMMENT
Topic
Name
8+2 =