← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #248604]: Sikuli logging into file

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
If we are talking about writing log messages to a file, then what you
want is already possible now:

supposing you have your own global function, that writes your log message to a file, then you can use Debug.setLogfile() to define a file, where the Sikuli log messages are written.
Just using Debug.log() ( [debug] ) will write your own messages into the same file.
Debug.log() can be configured to create message timestamps and there are Debug.action(), Debug.error() and Debug.info() that produce different message headers [log], [error] and [info].

So it is not really clear what you are missing.

What is still missing, but has low priority, is to use a standard
logging module. But this would not really change the situation for you,
since you would have to use Sikuli features for logging, not vice versa.

An additional option, that might make sense, is to accept a callback function from the user, that is called with the log message from SikuliX, instead of printing it or writing it to a file.
Do you think, this makes sense?

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