import os
from robot.variables import GLOBAL_VARIABLES
from robot.api import logger
from keywordgroup import KeywordGroup

class Logging(KeywordGroup):

    # Private

    def _debug(self, message):
        logger.debug(message)

    def _get_log_dir(self):
        logfile = GLOBAL_VARIABLES['${LOG FILE}']
        if logfile != 'NONE':
            return os.path.dirname(logfile)
        return GLOBAL_VARIABLES['${OUTPUTDIR}']

    def _html(self, message):
        logger.info(message, True, False)

    def _info(self, message):
        logger.info(message)

    def _log(self, message, level='INFO'):
        level = level.upper()
        if (level == 'INFO'): self._info(message)
        elif (level == 'DEBUG'): self._debug(message)
        elif (level == 'WARN'): self._warn(message)
        elif (level == 'HTML'): self._html(message)
        elif (level=='Error'):self._error(message)
        
    def _error(self,message):
        raise AssertionError(message)
     
    def _warn(self, message):
        logger.warn(message)

@@ -3,16 +3,17 @@
 port os%0A
+#
 from rob
@@ -49,16 +49,60 @@
 RIABLES%0A
+from robot.libraries.BuiltIn import BuiltIn%0A
 from rob

fix GLOBAL_VARIABLES import issue