<commit_before><?php
/*
 * Whitewashing
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to <EMAIL> so I can send you a copy immediately.
 */

namespace Whitewashing\Bundle\LogglyBundle\Monolog\Handler;

use Whitewashing\Bundle\LogglyBundle\WhitewashingLogglyBundle;
use Monolog\Handler\AbstractProcessingHandler;
use Monolog\Formatter\JsonFormatter;

/**
 * A loggly log handler for Symfony. It uses the Loggly HTTP API to push
 * logfiles to the cloud service loggly.
 *
 * @author <NAME> <<EMAIL>>
 */
class LogglyHandler extends AbstractProcessingHandler
{
    /**
     * @var string
     */
    private $key;
    /**
     * @var int
     */
    private $port;
    /**
     * @var string
     */
    private $host;

    /**
     * @var resource
     */
    private $fp;

    public function __construct($key, $port = 443, $host = 'logs.loggly.com', $level = Logger::DEBUG, $bubble = true)
    {
        $this->key = $key;
        $this->port = $port;
        $this->host = $host;

        parent::__construct($level, $bubble);
    }

    /**
     * {@inheritDoc}
     */
    protected function write(array $record)
    {
        $message = $record['formatted'];
<commit_msg>Remove unused property<commit_after><?php
/*
 * Whitewashing
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to <EMAIL> so I can send you a copy immediately.
 */

namespace Whitewashing\Bundle\LogglyBundle\Monolog\Handler;

use Whitewashing\Bundle\LogglyBundle\WhitewashingLogglyBundle;
use Monolog\Handler\AbstractProcessingHandler;
use Monolog\Formatter\JsonFormatter;

/**
 * A loggly log handler for Symfony. It uses the Loggly HTTP API to push
 * logfiles to the cloud service loggly.
 *
 * @author <NAME> <<EMAIL>>
 */
class LogglyHandler extends AbstractProcessingHandler
{
    /**
     * @var string
     */
    private $key;
    /**
     * @var int
     */
    private $port;
    /**
     * @var string
     */
    private $host;

    public function __construct($key, $port = 443, $host = 'logs.loggly.com', $level = Logger::DEBUG, $bubble = true)
    {
        $this->key = $key;
        $this->port = $port;
        $this->host = $host;

        parent::__construct($level, $bubble);
    }

    /**
     * {@inheritDoc}
     */
    protected function write(array $record)
    {
        $message = $record['formatted'];

{'fraction_non_alphanumeric': 0.11788321167883212, 'fraction_numerical': 0.0021897810218978104, 'mean_word_length': 2.709066305818674, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 17, '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': '1763803', 'n_tokens_mistral': 832, 'n_tokens_neox': 818, 'n_words': 264}