PHP code example of fei / logger-package

1. Go to this page and download the library: Download fei/logger-package 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/ */

    

fei / logger-package example snippets




use ObjectivePHP\Application\AbstractApplication;
use Fei\Service\Logger\Package\LoggerPackage;

class Application extends AbstractApplication
{
    public function init()
    {
        // Define some application steps
        $this->addSteps('bootstrap', 'init', 'auth', 'route', 'rendering');
        
        // Initializations...

        // Plugging the Logger Package in the bootstrap step
        $this->getStep('bootstrap')
        ->plug(LoggerPackage::class);

        // Another initializations...
    }
}



use ObjectivePHP\Application\AbstractApplication;
use Fei\Service\Logger\Package\LoggerPackage;

class Application extends AbstractApplication
{
    public function init()
    {
        // Define some application steps
        $this->addSteps('bootstrap', 'init', 'auth', 'route', 'rendering');
        
        // Initializations...

        // Plugging the Logger Package in the bootstrap step
        $this->getStep('bootstrap')
        ->plug(new LoggerPackage('identifier.service', 'my.step'));

        // Another initializations...
    }
}


use Fei\ApiClient\Config\BasicTransportConfig;
use Fei\ApiClient\Config\BeanstalkTransportConfig;
use Fei\Service\Logger\Package\Config\LoggerClientConfig;

return [
    (new LoggerClientConfig('https://logger.test.flash-global.net'))
            ->setSyncTransportConfig(new BasicTransportConfig())
            ->setAsyncTransportConfig(new BeanstalkTransportConfig('beanstalk.default'))
];