PHP code example of linkorb / flex-log
1. Go to this page and download the library: Download linkorb/flex-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/ */
linkorb / flex-log example snippets
use FlexLog\FlexLog;
FlexLog::initFromEnv()
FlexLog::ensureLoggers(['app', 'db', 'caching']); // ensures that loggers with these names exist and are registered
$username = 'joe';
\Monolog\Registry::app()->info("User {username} logged in", ['username' => $username]);
./vendor/bin/phpunit --bootstrap vendor/autoload.php tests/