Skip to content

iljapolanskis/ddev-buggregator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tests project is maintained

ddev-buggregator

What is ddev-buggregator?

This repository implements Buggregator as a DDEV add-on service.

Can be installed from the command line using the

ddev get iljapolanskis/ddev-buggregator

How to use

Open the mysite.ddev.site:8000 to see the Buggregator UI. Additional info on how to use Buggregator can be found in the Buggregator documentation

At the moment I tested the monolog only (used in Magento 2 by default). Snippet on how to use it in a single file in Magento 2:

<?php

require __DIR__ . '/../app/bootstrap.php';

use Monolog\Logger;
use Monolog\Handler\SocketHandler;
use Monolog\Formatter\JsonFormatter;

// Create a log channel
$log = new Logger('buggregator'); // Any name you want
$handler = new SocketHandler('buggregator:9913'); // The name of the service and the port, by default 9913 for monolog
$handler->setFormatter(new JsonFormatter());
$log->pushHandler($handler);

// Send records to the Buggregator
$log->warning(print_r($handler, true));



======== Inside Magento2 ======
// Create a log channel
$log = new \Monolog\Logger('buggregator'); // Any name you want
$handler = new \Monolog\Handler\SocketHandler('buggregator:9913'); // The name of the service and the port, by default 9913 for monolog
$handler->setFormatter(new \Monolog\Formatter\JsonFormatter());
$log->pushHandler($handler);

// Send records to the Buggregator
$log->warning(print_r($handler, true));