<commit_before><?php

    include_once(QFRAMEWORK_CLASS_PATH . "qframework/class/log/qlogger.class.php");
    include_once(QFRAMEWORK_CLASS_PATH . "qframework/class/log/qmessage.class.php");

    /**
     * @brief Establece el mecanismo de log de errores por defecto.
     *
     * @author  qDevel - <EMAIL>
     * @date    13/03/2005 04:18
     * @version 1.0
     * @ingroup log
     */
    class qErrorLogger extends qLogger
    {
        /**
         * Constructor
         */
        function &qErrorLogger ()
        {
            parent::qLogger();
        }

        /**
         * Log a message with a debug priority.
         *
         * @note This has a priority level of 1000.
         * @param message string An error message.
         * @param class string The class where message was logged.
         * @param function string The function where message was logged.
         * @param file string The file where message was logged.
         * @param line int    The line where message was logged.
         *
         * @public
         * @since  1.0
         */
        function debug($message, $class = NULL, $function = NULL, $file = NULL, $line = NULL)
        {
            $message =& new qMessage(array('m' => $message,
                                           'c' => $class,
                                           'F' => $function,
                                           'f' => $file,
                                           'l' => $line,
                                           'N' => 'DEBUG',
                                           'p' => 1000));

            $this->log($message);
        }

        /**
         * Log a message with an error priority.
         *
         * @note This has a priority level of 3000.
         * @param message  string An error message.
         * @param class    string The class where message was logged.
         * @param function string The function where message was logged.
         * @param file     string The file where message was logged.
         * @param line     int    The line where message was logged.
         *
         * @public
         * @since  1.0
         */
        function error ($message, $class = NULL, $function = NULL, $file = NULL, $line = NULL)
        {
            $message =& new qMessage(array('m' => $message,
                                           'c' => $class,
                                           'F' => $function,
                                           'f' => $file,
                                           'l' => $line,
                                           'N' => 'ERROR',
                                           'p' => 3000));

            $this->log($message);
        }

        /**
         * Log a message with a fatal priority.
         *
         * @note This has a priority level of 5000.
         * @param message  string An error message.
         * @param class    string The class where message was logged.
         * @param function string The function where message was logged.
         * @param file     string The file where message was logged.
         * @param line     int    The line where message was logged.
         *
         * @public
         * @since  1.0
         */
        function fatal ($message, $class = NULL, $function = NULL, $file = NULL, $line = NULL)
        {
            $message =& new qMessage(array('m' => $message,
                                           'c' => $class,
                                           'F' => $function,
                                           'f' => $file,
                                           'l' => $line,
                                           'N' => 'FATAL',
                                           'p' => 5000));

            $this->log($message);
        }

        /**
         * Log a message with a info priority.
         *
         * @note This has a priority level of 2000.
         * @param message  string An error message.
         * @param class    string The class where message was logged.
         * @param function string The function where message was logged.
         * @param file     string The file where message was logged.
         * @param line     int    The line where message was logged.
         *
         * @public
         * @since  1.0
         */
        function info ($message, $class = NULL, $function = NULL, $file = NULL, $line = NULL)
        {
            if ((substr($message, 0, 17) != "Undefined index: ")) // Don't show this error
            {
                $message =& new qMessage(array('m' => $message,
                                               'c' => $class,
                                               'F' => $function,
                                               'f' => $file,
                                               'l' => $line,
                                               'N' => 'NOTICE',
                                               'p' => 2000));
                $this->log($message);
            }
        }

        /**
         * Log an error handled by PHP.
         *
         * @note Do not call this method directly. Call the standard PHP function
         *       <i>trigger_error()</i>.
         * @param level   int    A priority level.
         * @param message string An error message.
         * @param file    string The file where the error occured.
         * @param line    int    The line where the error occured.
         *
         * @public
         * @since  1.0
         */
        function standard ($level, $message, $file, $line)
        {
            // don't want to print supressed errors
            if (error_reporting() > 0)
            {<commit_msg>Modified qErrorLogger to not show new annoying notice added in PHP 4.4.0<commit_after><?php

    include_once(QFRAMEWORK_CLASS_PATH . "qframework/class/log/qlogger.class.php");
    include_once(QFRAMEWORK_CLASS_PATH . "qframework/class/log/qmessage.class.php");

    /**
     * @brief Establece el mecanismo de log de errores por defecto.
     *
     * @author  qDevel - <EMAIL>
     * @date    13/03/2005 04:18
     * @version 1.0
     * @ingroup log
     */
    class qErrorLogger extends qLogger
    {
        /**
         * Constructor
         */
        function &qErrorLogger ()
        {
            parent::qLogger();
        }

        /**
         * Log a message with a debug priority.
         *
         * @note This has a priority level of 1000.
         * @param message string An error message.
         * @param class string The class where message was logged.
         * @param function string The function where message was logged.
         * @param file string The file where message was logged.
         * @param line int    The line where message was logged.
         *
         * @public
         * @since  1.0
         */
        function debug($message, $class = NULL, $function = NULL, $file = NULL, $line = NULL)
        {
            $message =& new qMessage(array('m' => $message,
                                           'c' => $class,
                                           'F' => $function,
                                           'f' => $file,
                                           'l' => $line,
                                           'N' => 'DEBUG',
                                           'p' => 1000));

            $this->log($message);
        }

        /**
         * Log a message with an error priority.
         *
         * @note This has a priority level of 3000.
         * @param message  string An error message.
         * @param class    string The class where message was logged.
         * @param function string The function where message was logged.
         * @param file     string The file where message was logged.
         * @param line     int    The line where message was logged.
         *
         * @public
         * @since  1.0
         */
        function error ($message, $class = NULL, $function = NULL, $file = NULL, $line = NULL)
        {
            $message =& new qMessage(array('m' => $message,
                                           'c' => $class,
                                           'F' => $function,
                                           'f' => $file,
                                           'l' => $line,
                                           'N' => 'ERROR',
                                           'p' => 3000));

            $this->log($message);
        }

        /**
         * Log a message with a fatal priority.
         *
         * @note This has a priority level of 5000.
         * @param message  string An error message.
         * @param class    string The class where message was logged.
         * @param function string The function where message was logged.
         * @param file     string The file where message was logged.
         * @param line     int    The line where message was logged.
         *
         * @public
         * @since  1.0
         */
        function fatal ($message, $class = NULL, $function = NULL, $file = NULL, $line = NULL)
        {
            $message =& new qMessage(array('m' => $message,
                                           'c' => $class,
                                           'F' => $function,
                                           'f' => $file,
                                           'l' => $line,
                                           'N' => 'FATAL',
                                           'p' => 5000));

            $this->log($message);
        }

        /**
         * Log a message with a info priority.
         *
         * @note This has a priority level of 2000.
         * @param message  string An error message.
         * @param class    string The class where message was logged.
         * @param function string The function where message was logged.
         * @param file     string The file where message was logged.
         * @param line     int    The line where message was logged.
         *
         * @public
         * @since  1.0
         */
        function info ($message, $class = NULL, $function = NULL, $file = NULL, $line = NULL)
        {
            if ((substr($message, 0, 17) != "Undefined index: ") && (substr($message, 0, 24) != "Only variable references")) // Don't show these errors
            {
                $message =& new qMessage(array('m' => $message,
                                               'c' => $class,
                                               'F' => $function,
                                               'f' => $file,
                                               'l' => $line,
                                               'N' => 'NOTICE',
                                               'p' => 2000));
                $this->log($message);
            }
        }

        /**
         * Log an error handled by PHP.
         *
         * @note Do not call this method directly. Call the standard PHP function
         *       <i>trigger_error()</i>.
         * @param level   int    A priority level.
         * @param message string An error message.
         * @param file    string The file where the error occured.
         * @param line    int    The line where the error occured.
         *
         * @public
         * @since  1.0
         */
        function standard ($level, $message, $file, $line)
        {
            // don't want to print supressed errors
            if (error_reporting() > 0)
            {
{'fraction_non_alphanumeric': 0.0991498959056211, 'fraction_numerical': 0.010929909784871617, 'mean_word_length': 1.0390873717721967, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 75, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 96, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '646182', 'n_tokens_mistral': 2757, 'n_tokens_neox': 2624, 'n_words': 939}