Logs not getting saved to external file

Asked by simran

Hi

My code is as follows:

import org.sikuli.basics.Debug
import org.sikuli.basics.Settings
Settings.LogTime = True
click("1478070703405.png")
Debug.setLogFile(<filePath>+"\\logs\\logs.txt")

But i cant see any logs saved to logs.txt
Please help.

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
masuo
Solved:
Last query:
Last reply:
Revision history for this message
masuo (masuo-ohara) said :
#1
Revision history for this message
simran (simran.handa) said :
#2

@masuo

I added:

Settings.ActionLogs = True
Settings.UserLogs = True

But no success.

Revision history for this message
masuo (masuo-ohara) said :
#3

Debug.on(n) is also necessary.

[Example:]
Debug.on(1)

Revision history for this message
simran (simran.handa) said :
#4

can you explain its usage

Revision history for this message
Best masuo (masuo-ohara) said :
#5

[Example:]
Settings.ActionLogs = True
Settings.UserLogs = True
Debug.setLogFile("c:\\tmp\\logs.txt")
Debug.on(1)

click("1478070703405.png")

Revision history for this message
simran (simran.handa) said :
#6

Still no logs are appearing in logs.txt

Revision history for this message
masuo (masuo-ohara) said :
#7

Sample codes work in my environment.

No error occured?
Is the path to the logs.txt correct?

Revision history for this message
simran (simran.handa) said :
#8

Thanks masuo, that solved my question.