<commit_before><?php

namespace Productsup\Flexilog\Handler;

use Gelf;

/**
 * Ouput to a Graylog server
 */
class GelfHandler extends AbstractHandler
{
    private $transport = null;
    private $publisher = null;

    public function __construct($minimalLevel = 'debug', $verbose = 0, $additionalParameters = array())
    {
        if (!isset($additionalParameters['server'])) {
            throw new \Exception('Server parameter must be set');
        }
        $port = isset($additionalParameters['port']) ? $additionalParameters['port'] : 12201;
        parent::__construct($minimalLevel, $verbose);
        $this->transport = new Gelf\Transport\UdpTransport(
            $additionalParameters['server'],
            $port,<commit_msg>Uses the default port set in the Gelf UDP Class<commit_after><?php

namespace Productsup\Flexilog\Handler;

use Gelf;

/**
 * Ouput to a Graylog server
 */
class GelfHandler extends AbstractHandler
{
    private $transport = null;
    private $publisher = null;

    public function __construct($minimalLevel = 'debug', $verbose = 0, $additionalParameters = array())
    {
        if (!isset($additionalParameters['server'])) {
            throw new \Exception('Server parameter must be set');
        }
        $port = isset($additionalParameters['port']) ? $additionalParameters['port'] : Gelf\Transport\UdpTransport::DEFAULT_PORT;
        parent::__construct($minimalLevel, $verbose);
        $this->transport = new Gelf\Transport\UdpTransport(
            $additionalParameters['server'],
            $port,
{'fraction_non_alphanumeric': 0.125, 'fraction_numerical': 0.004510309278350515, 'mean_word_length': 3.4371428571428573, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5973006', 'n_tokens_mistral': 427, 'n_tokens_neox': 405, 'n_words': 104}