<commit_before><?php
class FileLog
{
    protected $_dir;

    public function __construct()
    {
        $config_dir = App::instance()->config['log']['file']['directory'];

        if (!$config_dir)
            die('Please provide a log directory in your config file');
        else {
            $this->_dir = __dir__.'/../../../'.$config_dir.'/'.PHP_SAPI.'/';

            if (!is_writable($this->_dir))
                if (!mkdir($this->_dir, 0755, True))
                    die("{$this->_dir} does not exist or is not writable");
        }
    }

    public function write($type, $msg, $namespace = Null)<commit_msg>Removed the code incompatible with PHP 5.2.*<commit_after><?php
class FileLog
{
    protected $_dir;

    public function __construct()
    {
        $config_dir = App::instance()->config['log']['file']['directory'];

        if (!$config_dir)
            die('Please provide a log directory in your config file');
        else {
            $this->_dir = dirname(__FILE__).'/../../../'.$config_dir.'/'.PHP_SAPI.'/';

            if (!is_writable($this->_dir))
                if (!mkdir($this->_dir, 0755, True))
                    die("{$this->_dir} does not exist or is not writable");
        }
    }

    public function write($type, $msg, $namespace = Null)
{'fraction_non_alphanumeric': 0.17327117327117328, 'fraction_numerical': 0.00777000777000777, 'mean_word_length': 2.1338199513381997, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '4714505', 'n_tokens_mistral': 380, 'n_tokens_neox': 361, 'n_words': 93}