<commit_before><?php

namespace Bolt\Nut;

use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class LogTrim extends BaseCommand
{
    protected function configure()
    {
        $this
            ->setName('log:trim')
            ->setDescription('Trim the activitylog to recent/important items only.');
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->app['logger.manager']->trim('system');
        $this->app['logger.manager']->trim('change');

        $output->writeln("<info>Activity logs trimmed!</info>");
    }
}<commit_msg>Add audit logging to Bolt\Nut\LogTrim<commit_after><?php

namespace Bolt\Nut;

use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

/**
 * Nut command to clear the system & change logs
 */
class LogTrim extends BaseCommand
{
    /**
     * @see \Symfony\Component\Console\Command\Command::configure()
     */
    protected function configure()
    {
        $this
            ->setName('log:trim')
            ->setDescription('Trim the system & change logs.');
    }

    /**
     * @see \Symfony\Component\Console\Command\Command::execute()
     */
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->app['logger.manager']->trim('system');
        $this->app['logger.manager']->trim('change');

        $this->auditLog(__CLASS__, 'System system & change logs trimmed');
        $output->writeln("<info>System & change logs trimmed!</info>");
    }
}
{'fraction_non_alphanumeric': 0.14634146341463414, 'fraction_numerical': 0.0, 'mean_word_length': 3.199475065616798, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 22, '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': '6158539', 'n_tokens_mistral': 454, 'n_tokens_neox': 444, 'n_words': 89}