<commit_before><?php

use Silex\Application;
use Silex\Provider\TwigServiceProvider;
use Silex\Provider\RoutingServiceProvider;
use Silex\Provider\ValidatorServiceProvider;
use Silex\Provider\ServiceControllerServiceProvider;
use Silex\Provider\HttpFragmentServiceProvider;
use Silex\Provider\MonologServiceProvider;

class MyApplication extends Application
{
    use Silex\Application\MonologTrait;
}

$app = new MyApplication();
$app->register(new RoutingServiceProvider());
$app->register(new ValidatorServiceProvider());
$app->register(new ServiceControllerServiceProvider());
$app->register(new TwigServiceProvider());
$app->register(new HttpFragmentServiceProvider());
$app->register(new Silex\Provider\SwiftmailerServiceProvider());
$app->register(new MonologServiceProvider(), array(
    'monolog.logfile'   => __DIR__.'/../var/logs/app_criticals.log',
    'monolog.level'     => \Monolog\Logger::CRITICAL
));
$app->register(new Silex\Provider\SessionServiceProvider());

$app['session']->start();

$app['twig'] = $app->extend('twig', function ($twig, $app) {
    // add custom globals, filters, tags, ...

    $twig->addFunction(new \Twig_SimpleFunction('asset', function ($asset) use ($app) {
        return $app['request_stack']->getMasterRequest()->getBasepath().'/'.$asset;
    }));

    return $twig;
});<commit_msg>Revert "Change default Monolog Logfile to /../var/logs/app_criticals.log"<commit_after><?php

use Silex\Application;
use Silex\Provider\TwigServiceProvider;
use Silex\Provider\RoutingServiceProvider;
use Silex\Provider\ValidatorServiceProvider;
use Silex\Provider\ServiceControllerServiceProvider;
use Silex\Provider\HttpFragmentServiceProvider;
use Silex\Provider\MonologServiceProvider;

class MyApplication extends Application
{
    use Silex\Application\MonologTrait;
}

$app = new MyApplication();
$app->register(new RoutingServiceProvider());
$app->register(new ValidatorServiceProvider());
$app->register(new ServiceControllerServiceProvider());
$app->register(new TwigServiceProvider());
$app->register(new HttpFragmentServiceProvider());
$app->register(new Silex\Provider\SwiftmailerServiceProvider());
$app->register(new MonologServiceProvider(), array(
//    'monolog.logfile' => __DIR__.'/../var/logs/silex_dev.log',
    'monolog.logfile' => '/dev/null',
));
$app->register(new Silex\Provider\SessionServiceProvider());

$app['session']->start();

$app['twig'] = $app->extend('twig', function ($twig, $app) {
    // add custom globals, filters, tags, ...

    $twig->addFunction(new \Twig_SimpleFunction('asset', function ($asset) use ($app) {
        return $app['request_stack']->getMasterRequest()->getBasepath().'/'.$asset;
    }));

    return $twig;
});
{'fraction_non_alphanumeric': 0.16216216216216217, 'fraction_numerical': 0.0, 'mean_word_length': 6.302702702702702, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 33, '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': '7336582', 'n_tokens_mistral': 827, 'n_tokens_neox': 826, 'n_words': 138}