<commit_before><?php

namespace Productsup\Flexilog;

/**
 * A PSR-3 compatible Logger that uses Handlers to output to multiple resources at the same time.
 *
 * @package Flexilog\Logger
 * @author  Productsup GmbH
 * @author  <NAME> <<EMAIL>>
 * @license https://opensource.org/licenses/MIT MIT
 */
class Logger extends \Psr\Log\AbstractLogger
{
    private $handlers = array();
    protected $logInfo = null;
    public $autoRemove = false;

    /**
     * Initialise a new Logger with specific Handlers.
     * If no Handler is defined a default one will be initialized (Handler\GelfHandler)
     *
     * @param    array   $handlers Key/Value array where the Key is the Handler name and the object is an initialized Handler Interface
     * and the object is an initialized Handler Interface
     * @property string Handler name
     * @var      Handler\HandlerInterface Handler Interface
     * @param    LogInfo $logInfo
     */
    public function __construct(array $handlers = array(), Info\InfoInterface $logInfo = null, $autoRemove = false)
    {
        $this->logInfo = (isset($logInfo)) ? $logInfo : new Info\GenericInfo();
        $this->autoRemove = $autoRemove;

        foreach ($handlers as $handlerName => $handlerObject) {
            $handlerObject->setLogger($this);
            $handlerObject->init();
            $this->addHandler($handlerName, $handlerObject);
        }
    }

    public function setAutoRemove($autoRemove = false) {
        $this->autoRemove = (bool) $autoRemove;

        return $this;
    }

    /**
     * @param Info\InfoInterface $logInfo
     *
     * @return Logger $this
     */
    public function setLogInfo(Info\InfoInterface $logInfo)
    {
        $this->logInfo = $logInfo;

        return $this;
    }

    /**
     * Get the Info object attached to the Logger
     *
     * @return Info\InfoInterface $logInfo the Info Object
     */<commit_msg>Changes for Review<commit_after><?php

namespace Productsup\Flexilog;

/**
 * A PSR-3 compatible Logger that uses Handlers to output to multiple resources at the same time.
 *
 * @package Flexilog\Logger
 * @author  Productsup GmbH
 * @author  <NAME> <<EMAIL>>
 * @license https://opensource.org/licenses/MIT MIT
 */
class Logger extends \Psr\Log\AbstractLogger
{
    private $handlers = array();
    protected $logInfo = null;
    protected $autoRemove = false;

    /**
     * Initialise a new Logger with specific Handlers.
     * If no Handler is defined a default one will be initialized (Handler\GelfHandler)
     *
     * @param    array   $handlers Key/Value array where the Key is the Handler name and the object is an initialized Handler Interface
     * and the object is an initialized Handler Interface
     * @property string Handler name
     * @var      Handler\HandlerInterface Handler Interface
     * @var      bool    Defines if a Handler running into an Exception (for whatever reason) should be autoremoved from the Handlers.
     * @param    LogInfo $logInfo
     */
    public function __construct(array $handlers = array(), Info\InfoInterface $logInfo = null, $autoRemove = false)
    {
        $this->logInfo = (isset($logInfo)) ? $logInfo : new Info\GenericInfo();
        $this->autoRemove = $autoRemove;

        foreach ($handlers as $handlerName => $handlerObject) {
            $handlerObject->setLogger($this);
            $handlerObject->init();
            $this->addHandler($handlerName, $handlerObject);
        }
    }

    public function setAutoRemove($autoRemove)
    {
        $this->autoRemove = (bool) $autoRemove;

        return $this;
    }

    public function getAutoRemove()
    {
        return $this->autoRemove;
    }

    /**
     * @param Info\InfoInterface $logInfo
     *
     * @return Logger $this
     */
    public function setLogInfo(Info\InfoInterface $logInfo)
    {
        $this->logInfo = $logInfo;

        return $this;
    }

    /**
     * Get the Info object attached to the Logger
     *
     * @return Info\InfoInterface $logInfo the Info Object
     */
{'fraction_non_alphanumeric': 0.10168650793650794, 'fraction_numerical': 0.000496031746031746, 'mean_word_length': 2.6267985611510793, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 26, 'https://': 2, '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': '2828148', 'n_tokens_mistral': 1136, 'n_tokens_neox': 1093, 'n_words': 353}