<commit_before><?php


/**
 * Supports log4php version 2 (Apache project)
 */
class DF_Logger_Log4php_Version2 {
    static private $INSTANCE = NULL;

    static public function singleton() {
        if ($i = self::$INSTANCE) {
            return $i;
        }

        self::$INSTANCE = new DF_Logger_Log4php_Version2();
        return self::$INSTANCE;
    }

    public function logger($name) {
        return Logger::getLogger($name);
    }

    public function shutdown() {
        Logger::shutdown();
    }


    static public function isSupported() {
        @include_once 'log4php/Logger.php';
        if (class_exists('Logger')) {
            Logger::configure(LOG4PHP_CONFIGURATION);
            return true;
        }

        return false;
    }
  

}<commit_msg>More check for the correct Logger instance<commit_after><?php


/**
 * Supports log4php version 2 (Apache project)
 */
class DF_Logger_Log4php_Version2 {
    static private $INSTANCE = NULL;

    static public function singleton() {
        if ($i = self::$INSTANCE) {
            return $i;
        }

        self::$INSTANCE = new DF_Logger_Log4php_Version2();
        return self::$INSTANCE;
    }

    public function logger($name) {
        return Logger::getLogger($name);
    }

    public function shutdown() {
        Logger::shutdown();
    }


    static public function isSupported() {
        @include_once 'log4php/Logger.php';
        if (class_exists('Logger')) {
            if (!method_exists(array('Logger', 'configure'))) {
                return false;
            }
            Logger::configure(LOG4PHP_CONFIGURATION);
            return true;
        }

        return false;
    }
  

}
{'fraction_non_alphanumeric': 0.114540059347181, 'fraction_numerical': 0.009495548961424332, 'mean_word_length': 2.169172932330827, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '945298', 'n_tokens_mistral': 489, 'n_tokens_neox': 476, 'n_words': 109}