public function addError($error, $file = __FILE__, $line = __LINE__, $type = ERROR_INFORMATION, $log = LOG_SYSTEM) {
        if ($log != LOG_HISTORY && $log != LOG_CRONS && $log != LOG_EVENT) {
            if (Config::config()['user']['debug']['log']) {
                if ($log == LOG_SQL) {
                    $error = preg_replace('#([\t]{2,})#isU', "", $error);
                }

                $data = date("d/m/Y H:i:s : ", time()) . '[' . $type . '] file ' . $file . ' / line ' . $line . ' / ' . $error;
                file_put_contents(APP_LOG_PATH . $log . '.log', $data . "\n", FILE_APPEND | LOCK_EX);

                if ((Config::config()['user']['debug']['error']['error'] && $type == ERROR_FATAL) || (Config::config()['user']['debug']['error']['exception'] == true && $type == ERROR_EXCEPTION) || preg_match('#Exception#isU', $type) || (Config::config()['user']['debug']['error']['fatal'] == true && $type == ERROR_ERROR)) {
                    if (CONSOLE_ENABLED == MODE_HTTP) {
                        echo $data . "\n<br />";
                    }
                    else {
                        echo $data . "\n";
                    }
                }
            }
        }
        else {
            file_put_contents(APP_LOG_PATH . $log . '.log', $error . "\n", FILE_APPEND | LOCK_EX);
        }
    }