** Changed in: sikuli
Status: In Progress = Fix Committed
** Changed in: sikuli
Importance: Medium = Critical
--
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1350735
Title:
[request]
was in a hurry last night.
It principally works, but every redirected log call returns an error and
the log is repeated in the normal way.
I have fixed it and and some other quirks and will upload later today.
--
You received this bug notification because you are a member of Sikuli
Drivers,
I implemented a solution, that supports logging redirect in Jython scripting.
JRuby not yet ready.
Should be available with the next nightly.
--
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1350735
-- the gem:
now only available on rubygems.org the version 1.1.0.2 should work.
https://rubygems.org/gems/sikulix
-- the logger redirect:
only to be clear:
$log must contain a logger instance, that contains as instance methods with the
subsequently issued names.
the methods MUST have only one
I tried your java code in Eclipse using Java/Junit. It works as you
indicated.
Then I also tried it using Pydev with Jython in eclipse using the following
code:
---
class MyLogger:
def info(self,msg):
print MyLogger: + msg
log = MyLogger()
log.info('Directly from the new logger')
Will check that tomorrow.
I guess, that this is the problem at least with Jython, that methods in Jython
cannot be used directly as callbacks.
I guess the problem is similar for JRuby.
So this simple solution currently only works on the Java level.
Hope, I find a simple solution.
--
You
I see the newly added methods in
http://nightly.sikuli.de/docs/index.html
I am not sure where to find the nightly download of the corresponding jar
though.
I can't seem to find anything new in https://launchpad.net/sikuli/+download or
other links.
By the way, I downloaded sikulix-1.1.0.1.gem
start here:
http://sikulix.com
button nightly builds
there you find everything.
the current gem:
https://rubygems.org/gems/sikulix
--
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1350735
Title:
OK. I did not realize the beta release was the one being updated
nightly.
I tried it with the updated jar. It could not get it to work.
Below is the code I added (I also tried strings 'info' instead of symbols
:info):
$log.info $log.methods.include?(:info)
Debug.setLoggerNoPrefix($log)
this is my idea about how to implement this:
you have some logger instance (e.g. myLogger), which in turn has some
methods like .info, .error, .warning, , that accept a string as the
one and only parameter.
now you can tell Debug to redirect to your logger using one of these
methods:
I think either of these approaches would work great.
Regarding the prefix question... being able to control the prefix would also
be a nice feature.
In the case of my logger, it already prints its own prefix based on which
method is called.
Since your proposal is redirecting
If you like to test: I have implemented a basic implementation (usage
see javadocs).
you might download sikulixapi.jar or setup from
nightly.sikuli.de
the upload will be ready in about 4 hours. (3 am european time)
the github repo is uptodate already now.
the additional options I will
12 matches
Mail list logo