Logging module does not work via console - Sikuli 2.0.4/Java 11

Asked by TestMechanic on 2020-11-23

sikuli v 2.0.4
java 11

start IDE and paste this script

import logging
logging.error("print error")

run script in IDE - as result you will see logging error "print error" - this is OK

save script as "1.sikuli" and run it from console with "-r 1.sikuli" option - nothing printed - BUG?!

What I have tried

1. I've tried different variants with logging module but behavior is the same - works in IDE but not in console
2. print("hi") works fine
3. in sikuli 1.1.3 with java 8 this works fine in console
4. I tested this on Linux but I do not thing it is an OS problem

Any ideas if this is a bug or I am missing something?

Question information

Language:
English Edit question
Status:
Answered
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2020-11-23
Last reply:
2020-11-26
Assi.NET (assi-ivomir) said : #1

I have the same issue with:
logging.info()
logging.error()

I'm using it extensively and this behavior is really annoying because it is blocking logging in Jenkins and in the console during the run of the tests. If I use print it only goes in the report generated at the end of the run

I'm actually using unittest and HTMLTestRunner

RaiMan (raimund-hocke) said : #2

The only suggestion I have in the moment, is to run your script from command line using a standalone Jython (2.7.2 recommended).

TestMechanic (ndinev) said : #3

Hi RaiMan,

Thanks for the answer.

Any guidance how can I do this?

Can you help with this problem?

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

To post a message you must log in.