Skip to content

Instantly share code, notes, and snippets.

@Hyperparticle
Created June 5, 2017 02:22
Show Gist options
  • Save Hyperparticle/56b0fd04dd72bdd0e52089765f1eabf6 to your computer and use it in GitHub Desktop.
Save Hyperparticle/56b0fd04dd72bdd0e52089765f1eabf6 to your computer and use it in GitHub Desktop.
Robot Framework Python controller
class Controller(object):
def __init__(self):
self._sut_path = os.path.join(os.path.dirname(__file__),
'..', 'sut', 'login.py')
self._status = ''
self.logger = logging.getLogger('localhost', 3456)
handler = logging.StreamHandler()
formatter = logging.Formatter('%(asctime)s %(levelname)-8s %(message)s')
handler.setFormatter(formatter)
self.logger.addHandler(handler)
self.logger.setLevel(logging.DEBUG)
for f,a in my_funcs:
self.logger.debug('Executing ' + f ' with args ' + a)
# ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment