[Sikuli-driver] [Bug 1350735] Re: [request] want options to redirect Sikuli's log messages to my own logging

2014-09-08 Thread RaiMan
** 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]

[Sikuli-driver] [Bug 1350735] Re: [request] want options to redirect Sikuli's log messages to my own logging

2014-08-05 Thread RaiMan
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,

[Sikuli-driver] [Bug 1350735] Re: [request] want options to redirect Sikuli's log messages to my own logging

2014-08-04 Thread RaiMan
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

[Sikuli-driver] [Bug 1350735] Re: [request] want options to redirect Sikuli's log messages to my own logging

2014-08-03 Thread RaiMan
-- 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

[Sikuli-driver] [Bug 1350735] Re: [request] want options to redirect Sikuli's log messages to my own logging

2014-08-03 Thread Lev
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')

[Sikuli-driver] [Bug 1350735] Re: [request] want options to redirect Sikuli's log messages to my own logging

2014-08-03 Thread RaiMan
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

[Sikuli-driver] [Bug 1350735] Re: [request] want options to redirect Sikuli's log messages to my own logging

2014-08-02 Thread Lev
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

[Sikuli-driver] [Bug 1350735] Re: [request] want options to redirect Sikuli's log messages to my own logging

2014-08-02 Thread RaiMan
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:

[Sikuli-driver] [Bug 1350735] Re: [request] want options to redirect Sikuli's log messages to my own logging

2014-08-02 Thread Lev
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)

[Sikuli-driver] [Bug 1350735] Re: [request] want options to redirect Sikuli's log messages to my own logging

2014-07-31 Thread RaiMan
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:

[Sikuli-driver] [Bug 1350735] Re: [request] want options to redirect Sikuli's log messages to my own logging

2014-07-31 Thread Lev
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

[Sikuli-driver] [Bug 1350735] Re: [request] want options to redirect Sikuli's log messages to my own logging

2014-07-31 Thread RaiMan
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