← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #180346]: Timestamp in logfile

 

Question #180346 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/180346

RaiMan posted a new comment:
@ Jason

The example in comment #8 is not correct.
As it is written, all words "logger" have to be replaced by "logging".
And you have to add a
logging.basicConfig(filename=r"C:\some-folder\mylogfile.txt", level=logging.INFO)

to tell the logging handler to what file to append your messages.

A good starting point for the use of Python's logging feature is:
http://docs.python.org/howto/logging.html#logging-basic-tutorial

--- I want to write a log file whether a test case is failed or passed after it's executed.
What are you talking about?
- test cases in Sikuli IDE's unit test feature?
- test cases in Sikuli scripts using Python's unittest feature? (see faq 1804)
- or what else? coding example?

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