Create Debug.user log message with milliseconds

Asked by alan carr

I am using Debug.user("xyz") to produce a log message , however these messages by default are only Hrs Mins Secs . I should like the log message to be Hrs Mins Secs Milliseconds.

I tried by defining my own format for time.strftime, however I'm not sure how to get my script to use this for each debug message.

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

Supposing, you are using Python scripting:
- switch of the time stamp: Settings.UserLogTime = False
- make your own function, that adds your timestamp to the message and then hand over to Debug.user()
- use this function instead of Debug.user()

.... but with SikuliX, where usually the search time lasts some 100 milliseconds I do not see the need for this granularity.

Can you help with this problem?

Provide an answer of your own, or ask alan carr for more information if necessary.

To post a message you must log in.