PHP code example of gyselroth / php-helper-log
1. Go to this page and download the library: Download gyselroth/php-helper-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/ */
gyselroth / php-helper-log example snippets
use Gyselroth\Helper;
//...
$app = new \Slim\App($settings);
$container = $app->getContainer();
//...
$container['logger'] = function (/*...*/) {
// Callback to PSR-7 logger, e.g. Monolog
//...
};
// Register host application's logger component within gyselroth Helper's logger wrapper
new \Gyselroth\HelperLog\LoggerWrapper($app->getContainer()['logger']);
use Gyselroth\Helper\;
//...
$app = new Zend_Application($env, $config);
$app->bootstrap();
// Register ZF1 logger class within the helper library's logger-wrapper
new LoggerWrapper('App_Log');
$app->run();