← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #263462]: Redirecting the Sikuli Logger and the "setLogger: Jython init: we have problems" Error

 

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

    Status: Answered => Open

aidma is still having a problem:
I tried creating myLogger in the SikuliIDE 1.1.0 and it worked as
expected.

Unfortunately I am still unable to get it working from within the
Eclipse environment or the interactive Jython console. I tried your
suggestion but to no avail:

C:\>java -cp C:\SikuliX1.1\sikulixapi.jar;C:\jython2.7b4\jython.jar
org.python.util.jython

Jython 2.7b4 (default:3672e624962a, Feb 13 2015, 04:59:14)
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.7.0_71
Type "help", "copyright", "credits" or "license" for more information.

>>> import org.sikuli.basics.SikulixForJython
>>> from sikuli import *
>>> class myLogger():
... ____def callback(message):
... ________print "redir: ",message
...
>>> Debug.setLogger(myLogger())
[setLogger: Jython init: we have problems
%s] org.sikuli.scriptrunner.ScriptRunner

(the underscores are not literal underscores, I put them there to
preserve indentation within this post)


Also interesting: Debug.log(msg) doesn't work from within my interactive
console either (with or without redirected logs). It displays nothing.
Though, similar to Debug.setLogger(obj), Debug.log(msg) DOES work when I
use it in Sikulix IDE...

I must be making a mistake somewhere, but I haven't the faintest idea
where.

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