PHP code example of t4web / log

1. Go to this page and download the library: Download t4web/log library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

t4web / log example snippets



return array(
    'modules' => array(
        // ...
        'T4web\Log',
    ),
    // ...
);

't4web-log' => [
   'scopes' => [
       'general' => 1,
       'payments' => 2,
       'users' => 3,
       'background-jobs' => 4,
   ],
],

$logger = $this->getServiceLocator()->get(\T4web\Log\Logger::class);
$logger->log('general', 'test message');
$logger->log('general', 'test message', \T4web\Log\Logger::PRIORITY_ERR, ['file' => __FILE__, 'line' => __LINE__]);
bash
$ php composer.phar update