public static function activateError($iLevel)
    {
        if (self::$_bFirstActivation === true) {

            self::_setFileNameInErrorFile();
            self::$_bFirstActivation = false;
        }

        self::_initLogFile();
        self::$_bActivateError = true;

        error_reporting($iLevel);

        set_error_handler(function ($iErrNo, $sErrStr, $sErrFile, $iErrLine)
        {
            $aContext = array('file' => $sErrFile, 'line' => $iErrLine);

            $sType = self::getTranslateErrorCode($iErrNo);

            self::getInstance()->$sType($sErrStr, $aContext);

            return true;
        }, $iLevel);

        register_shutdown_function(function()
        {
            if (null !== ($aLastError = error_get_last())) {

                $aContext = array('file' => $aLastError['file'], 'line' => $aLastError['line']);

                $sType = self::getTranslateErrorCode($aLastError['type']);

                self::getInstance()->$sType($aLastError['message'], $aContext);
            }
        });
    }