I'm using sikuli-script.jar in my java application. It writes a lot of logging messages in the console. So, I want to disable logging or change the logging level. How I can do this? What logging library is used there and how it can be configured?
5 Answers
I run some Sikuli script a few times and never noticed any verbose output. I think you can override it by passing to the JVM an option like this:
-Dsikuli.Debug=ERROR
or
-Dsikuli.Debug=0
This is an untested answer. You'll have to try it yourself.

- 28,471
- 61
- 196
- 289
-
Debug=0 doesn't work. It disables info messages when Debug=-2. This is pretty strange behavior. http://code.google.com/p/liuyn/source/browse/trunk/Sikuli-script/src/main/java/edu/mit/csail/uid/Debug.java – NullPointer Jan 16 '13 at 20:57
If you're using Java, you may want to check out Sikuli-API instead. It tries to be more of a standard Java library.
Sikuli-API uses SLF4J, so you just connect it to whatever logging framework you use (I like Logback a lot), and it will use that configuration.

- 23,261
- 7
- 71
- 99
You can include this line in your script at the top to disable action logs like mouse click logs on stdout :D
Settings.ActionLogs=0

- 755
- 1
- 8
- 19
-
Settings.ActionLogs returns boolean. Settings.ActionLogs=0 would be compile error I think – Ripon Al Wasim May 20 '15 at 11:42
In the sikuli-java.jar, sikuli-basics allows access to some configurable options:
Settings.ActionLogs
Settings.InfoLogs
Either/both can be assigned false to disable logging.
Alternatively, Debug.setLogFile(filename) may be used to redirect output to a file rather than the stdout.
Good luck, sikuli-guy!

- 1
For Sikuli 1.1.0 under Mac OS X 10.11.5 and JDK 1.8, this is the only way I can suppress logging when running the script via CLI:
java -Dsikuli.Debug=-2 -jar /Applications/SikuliX.app/Contents/Java/sikulix.jar -r /path/to/your/test.sikuli
NOTE:
1) You have to set -Dsikuli.Debug to -2 to make it work (thanks @NullPointer)
2) You have to place -Dsikuli.Debug=-2 as a JVM option right after "java" instead of placing it at the end of the command

- 8,894
- 9
- 59
- 67