← Back to team overview

sikuli-driver team mailing list archive

[Question #164823]: Sikulil IDE disappears running test of library with logging module

 

New question #164823 on Sikuli:
https://answers.launchpad.net/sikuli/+question/164823

I am developing a test infrastructure and want a library to setup logging to a file.
In Sikuli, I created a script with the code below.  Every time I run it, the specified log file 
gets updated, but the Sikuli IDE goes away.

Am I doing something wrong, or is this a bug?

# Module to set up logging and reporting
import os
import logging

TestLog = 0

def setupLogging(path, debug = 0):
	global TestLog

	if debug:
		levelLog = logging.DEBUG
	else:
		levelLog = logging.INFO
	logging.basicConfig(filename=path,level=levelLog)
	TestLog = logging.getLogger()

if __name__ == "__main__":
	setupLogging("C:\\Users\\bgriffin.AMD\\TestLog", debug=1)

	TestLog.error("Test Error Log")
	TestLog.warning("Test Warning Log")
	TestLog.info("Test Info Log")
	TestLog.debug("Test Debug Log")

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.