PHP code example of instapage / php-logger
1. Go to this page and download the library: Download instapage/php-logger 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/ */
instapage / php-logger example snippets
declare(strict_types=1);
use Instapage\Logger\Factory\LoggerFactory;
use Instapage\Metrics\Factory\MetricCollectorFactory;
use Monolog\Logger;
ry())->create(
'my-service.worker'
);
// Simple one-liner
$logger->info('User created', ['id' => 123, 'role' => 'admin']);
$metric->collect('Queue size', 42);
$metric->collect('Memory used by worker (MB)', 123.50);
json
"instapage/php-logger": "1.5.1"