1. Go to this page and download the library: Download fei/logger-client 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-client example snippets
// sample configuration for production environment
$logger = new Logger(array(
Logger::OPTION_BASEURL => 'http://logger.flash-global.net',
Logger::OPTION_FILTER => Notification::LVL_DEBUG,
)
);
// inject transport classes
$logger->setTransport(new BasicTransport());
// optionnal asynchronous transport, that will be automatically used to push notifications
//
// NOTE this transport
use Fei\Service\Logger\Client\Logger;
use Fei\Service\Logger\Client\Psr\PsrLoggerAdapter;
$logger = new Logger();
$psr = new PsrLoggerAdapter($logger);
$psr->error('This is a error message');
use Fei\Service\Logger\Client\Logger;
use Fei\Service\Logger\Client\Psr\PsrLoggerAdapter;
use Fei\Service\Logger\Entity\Notification;
$logger = new Logger();
$psr = new PsrLoggerAdapter($logger);
$psr->error(
'This is a error message',
[
'namespace' => '/my/app',
'category' => Notification::TRACKING,
'key1' => 'value1',
'key2' => 'value2'
]
);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.