<commit_before><?php

class SAML2_Compat_Ssp_Logger implements Psr\Log\LoggerInterface
{
    /**
     * System is unusable.
     *
     * @param string $message
     * @param array $context
     * @return NULL
     */
    public function emergency($message, array $context = array())
    {
        SimpleSAML_Logger::emergency($message . var_export($context, TRUE));
    }

    /**
     * Action must be taken immediately.
     *
     * Example: Entire website down, database unavailable, etc. This should
     * trigger the SMS alerts and wake you up.
     *
     * @param string $message
     * @param array $context
     * @return NULL
     */
    public function alert($message, array $context = array())
    {
        SimpleSAML_Logger::alert($message . var_export($context, TRUE));
    }

    /**
     * Critical conditions.
     *
     * Example: Application component unavailable, unexpected exception.
     *
     * @param string $message
     * @param array $context
     * @return NULL
     */
    public function critical($message, array $context = array())
    {
        SimpleSAML_Logger::critical($message . var_export($context, TRUE));
    }

    /**
     * Runtime errors that do not require immediate action but should typically
     * be logged and monitored.
     *
     * @param string $message
     * @param array $context
     * @return NULL
     */
    public function error($message, array $context = array())
    {
        SimpleSAML_Logger::error($message . var_export($context, TRUE));
    }

    /**
     * Exceptional occurrences that are not errors.
     *
     * Example: Use of deprecated APIs, poor use of an API, undesirable things
     * that are not necessarily wrong.
     *
     * @param string $message
     * @param array $context
     * @return NULL
     */
    public function warning($message, array $context = array())
    {
        SimpleSAML_Logger::warning($message . var_export($context, TRUE));
    }

    /**
     * Normal but significant events.
     *
     * @param string $message
     * @param array $context
     * @return NULL
     */
    public function notice($message, array $context = array())
    {
        SimpleSAML_Logger::notice($message . var_export($context, TRUE));
    }

    /**
     * Interesting events.
     *
     * Example: User logs in, SQL logs.
     *
     * @param string $message
     * @param array $context
     * @return NULL
     */
    public function info($message, array $context = array())
    {
        SimpleSAML_Logger::info($message . var_export($context, TRUE));
    }

    /**
     * Detailed debug information.
     *
     * @param string $message
     * @param array $context
     * @return NULL
     */
    public function debug($message, array $context = array())
    {
        SimpleSAML_Logger::debug($message . var_export($context, TRUE));
    }

    /**
     * Logs with an arbitrary level.
     *
     * @param mixed $level
     * @param string $message
     * @param array $context
     * @return NULL
     */
    public function log($level, $message, array $context = array())
    {
        SimpleSAML_Logger::log_internal($level, $message . var_export($context, TRUE));
    }
}<commit_msg>Change the Logger::log() function to call specific methods from the SimpleSAML_Logger class instead of log_internal().<commit_after><?php

class SAML2_Compat_Ssp_Logger implements Psr\Log\LoggerInterface
{
    /**
     * System is unusable.
     *
     * @param string $message
     * @param array $context
     * @return NULL
     */
    public function emergency($message, array $context = array())
    {
        SimpleSAML_Logger::emergency($message . var_export($context, TRUE));
    }

    /**
     * Action must be taken immediately.
     *
     * Example: Entire website down, database unavailable, etc. This should
     * trigger the SMS alerts and wake you up.
     *
     * @param string $message
     * @param array $context
     * @return NULL
     */
    public function alert($message, array $context = array())
    {
        SimpleSAML_Logger::alert($message . var_export($context, TRUE));
    }

    /**
     * Critical conditions.
     *
     * Example: Application component unavailable, unexpected exception.
     *
     * @param string $message
     * @param array $context
     * @return NULL
     */
    public function critical($message, array $context = array())
    {
        SimpleSAML_Logger::critical($message . var_export($context, TRUE));
    }

    /**
     * Runtime errors that do not require immediate action but should typically
     * be logged and monitored.
     *
     * @param string $message
     * @param array $context
     * @return NULL
     */
    public function error($message, array $context = array())
    {
        SimpleSAML_Logger::error($message . var_export($context, TRUE));
    }

    /**
     * Exceptional occurrences that are not errors.
     *
     * Example: Use of deprecated APIs, poor use of an API, undesirable things
     * that are not necessarily wrong.
     *
     * @param string $message
     * @param array $context
     * @return NULL
     */
    public function warning($message, array $context = array())
    {
        SimpleSAML_Logger::warning($message . var_export($context, TRUE));
    }

    /**
     * Normal but significant events.
     *
     * @param string $message
     * @param array $context
     * @return NULL
     */
    public function notice($message, array $context = array())
    {
        SimpleSAML_Logger::notice($message . var_export($context, TRUE));
    }

    /**
     * Interesting events.
     *
     * Example: User logs in, SQL logs.
     *
     * @param string $message
     * @param array $context
     * @return NULL
     */
    public function info($message, array $context = array())
    {
        SimpleSAML_Logger::info($message . var_export($context, TRUE));
    }

    /**
     * Detailed debug information.
     *
     * @param string $message
     * @param array $context
     * @return NULL
     */
    public function debug($message, array $context = array())
    {
        SimpleSAML_Logger::debug($message . var_export($context, TRUE));
    }

    /**
     * Logs with an arbitrary level.
     *
     * @param mixed $level
     * @param string $message
     * @param array $context
     * @return NULL
     */
    public function log($level, $message, array $context = array())
    {
        switch ($level) {
            case SimpleSAML_Logger::ALERT:
                SimpleSAML_Logger::alert($message);
                break;
            case SimpleSAML_Logger::CRIT:
                SimpleSAML_Logger::critical($message);
                break;
            case SimpleSAML_Logger::DEBUG:
                SimpleSAML_Logger::debug($message);
                break;
            case SimpleSAML_Logger::EMERG:
                SimpleSAML_Logger::emergency($message);
                break;
            case SimpleSAML_Logger::ERR:
                SimpleSAML_Logger::error($message);
                break;
            case SimpleSAML_Logger::INFO:
                SimpleSAML_Logger::info($message);
                break;
            case SimpleSAML_Logger::NOTICE:
                SimpleSAML_Logger::notice($message);
                break;
            case SimpleSAML_Logger::WARNING:
                SimpleSAML_Logger::warning($message);
        }
    }
}
{'fraction_non_alphanumeric': 0.11228641171684296, 'fraction_numerical': 0.00027122321670735016, 'mean_word_length': 2.1829952524816574, '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': '3080383', 'n_tokens_mistral': 2069, 'n_tokens_neox': 1968, 'n_words': 551}