1. Go to this page and download the library: Download productsupcom/flexilog 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/ */
productsupcom / flexilog example snippets
roductsup\Flexilog\Logger;
use Productsup\Flexilog\Info;
use Productsup\Flexilog\Handler;
// this is optional
// a Info class allows you to set certain properties that you always
// want to include in your Log output (e.g. Gelf or Shell)
// this is an expanditure to the `$context`.
// You can define specific );
$logger->notice('Hello World');
// initialise a few Handlers, use the default verbosity set in the Handler
$shellHandler = new Handler\ShellHandler('trace');
// set the Verbosity to -1, which allows it to be muted
$arrayHandler = new Handler\ArrayHandler('debug', -1);
$logger = new Logger([$shellHandler, $arrayHandler]);
// now send a message where $muted is set to true
$logger->log('debug', 'foobar', ['baz'=>'bar'], true);
$logger->log('trace', $message, $context);
public function execute(InputInterface $input, OutputInterface $output)
{
$logger = new \Productsup\Logger(
array(
'Console' => new \Productsup\Handler\SymfonyConsoleHandler('debug', 2, $output)
)
);
$logger->message('message');
$logger->error('errrooorrr');
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.