<commit_before><?php

namespace G4\Log;

class Logger
{

    /**
     * @var AdapterInterface
     */
    private $adapter;

    /**
     * Logger constructor.
     * @param AdapterInterface $adapter
     */
    public function __construct(\G4\Log\AdapterInterface $adapter)
    {
        $this->adapter = $adapter;
    }

    public function log(\G4\Profiler\Data\LoggerAbstract $data)
    {
        $this->adapter->save($data->getRawData());
    }

    public function logAppend(\G4\Profiler\Data\LoggerAbstract $data)
    {
        $this->adapter->saveAppend($data->getRawData());
    }

    public function runtimeLog($var, $tag = false)
    {
        $this->log(new \G4\Profiler\Data\RuntimeLog($var, $tag));
    }
}<commit_msg>Added line index param as fourth argument in runTimeLog() method with 2 as default value<commit_after><?php

namespace G4\Log;

class Logger
{

    const DEFAULT_LINE = 2;

    /**
     * @var AdapterInterface
     */
    private $adapter;

    /**
     * Logger constructor.
     * @param AdapterInterface $adapter
     */
    public function __construct(\G4\Log\AdapterInterface $adapter)
    {
        $this->adapter = $adapter;
    }

    public function log(\G4\Profiler\Data\LoggerAbstract $data)
    {
        $this->adapter->save($data->getRawData());
    }

    public function logAppend(\G4\Profiler\Data\LoggerAbstract $data)
    {
        $this->adapter->saveAppend($data->getRawData());
    }

    public function runtimeLog($var, $tag = false, $index = self::DEFAULT_LINE)
    {
        $this->log(new \G4\Profiler\Data\RuntimeLog($var, $tag, $index));
    }
}
{'fraction_non_alphanumeric': 0.14250155569383946, 'fraction_numerical': 0.0074673304293715, 'mean_word_length': 2.6053811659192827, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, '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': '454269', 'n_tokens_mistral': 506, 'n_tokens_neox': 499, 'n_words': 96}