<commit_before><?php

class TaskLogListener
{
    public function beforeDispatch($event, $dispatcher)
    {
        $di = $dispatcher->getDI();
        $task = $dispatcher->getTaskName();
        $action = $dispatcher->getActionName();
        $di['logger']->info($task.'#'.$action.': start');
    }

    public function afterDispatch($event, $dispatcher)
    {
        $di = $dispatcher->getDI();
        $task = $dispatcher->getTaskName();
        $action = $dispatcher->getActionName();
        $di['logger']->info($task.'#'.$action.': finish');
    }

    public function beforeException($event, $dispatcher, $ex)
    {
        $di = $dispatcher->getDI();
        $task = $dispatcher->getTaskName();
        $action = $dispatcher->getActionName();
        $message = sprintf('%s#%s: aborted: "%s"', $task, $action, $ex->getMessage());
        $di['loger']->error($message);
        return false;
    }
}
<commit_msg>fixed error when exepception occurred<commit_after><?php

class TaskLogListener
{
    public function beforeDispatch($event, $dispatcher)
    {
        $di = $dispatcher->getDI();
        $task = $dispatcher->getTaskName();
        $action = $dispatcher->getActionName();
        $di['logger']->info($task.'#'.$action.': start');
    }

    public function afterDispatch($event, $dispatcher)
    {
        $di = $dispatcher->getDI();
        $task = $dispatcher->getTaskName();
        $action = $dispatcher->getActionName();
        $di['logger']->info($task.'#'.$action.': finish');
    }

    public function beforeException($event, $dispatcher, $ex)
    {
        $di = $dispatcher->getDI();
        $task = $dispatcher->getTaskName();
        $action = $dispatcher->getActionName();
        $message = sprintf('%s#%s: aborted: "%s"', $task, $action, $ex->getMessage());
        $di['logger']->error($message);
        return false;
    }
}

{'fraction_non_alphanumeric': 0.19410187667560322, 'fraction_numerical': 0.0, 'mean_word_length': 2.911949685534591, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 29, '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': '3590645', 'n_tokens_mistral': 572, 'n_tokens_neox': 577, 'n_words': 100}