Alex, FYI, There is "one weird little trick" that you might find useful. Opencog comes with something called "the cogserver", which is a networked command-line shell. You can telnet into it, any number of times that you want, and from there, start either a scheme shell or a python shell (as many as you want) and then poke around, monitor status, whack things, etc. while the system is running. All instances, both guile and python, share the same attached atomspace. Everything is fully multi-threaded and thread-safe, and, most importantly, crash-proof (a very handy property when running robots, or any jobs, for days/weeks on end.) I've run this with ROS, pumping 50 messages/second into the atomspace, for hours/days on end.
In your case, you can start your system, connect to the cogserver, and turn logging on/off at any time, or do any other maintenance, stats collection, monitoring, etc. There's two, maybe three ways to do this: 1) First, the "ugly" way. Start the cogserver executable first, and then get a python shell by saying "rlwrap telnet localhost 17001". The rlwrap thing enables arrow keys, command history. This is ugly because the resulting python shell is not natural. 2) Start guile first, then say "(use-modules (opencopg cogserver)) (start-cogserver)" and then rlwrap-telnet. This way, you have a "natural" scheme shell, but still no natural python shell. 3) Start python first, then "import opencog.cogserver" then ??? and then rlwrap-telnet. This way you have a "natural" python shell, and the rest is accessible via telnet. I'm not clear on ??? its under-documented. -- Linas On Sat, Feb 29, 2020 at 10:20 AM Alexander Gabriel <[email protected]> wrote: > > > Am Donnerstag, 27. Februar 2020 04:07:03 UTC schrieb Nil: >> >> Hi Alex, >> >> my recommendation is that you turn on the URE log and look at the >> atomese code generated by the URE. >> > > Hi Nil, > I added the set_component method of the Logger class to the cython logger > > interface, but after setting that to URE and the level to DEBUG the logger > > still doesn't produce any output from the URE in python. My guess is that > > the URE is using another instance of the logger and that adding a function > > to the chainers to return that logger instance would be the easiest way > > to get access to it from python. > > My python project is quite complex and is interacting with a simulation > > environment in gazebo over ros, so debugging the reasoning in scheme > > doesn't really work as i can't reproduce the state of the atomspace reliably. > > Do you know of a way to get access to the URE logger from python that > > already works? > > Best, > > Alex > > -- > You received this message because you are subscribed to the Google Groups > "opencog" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/opencog/402a7064-035e-4cb6-85eb-484a058feac9%40googlegroups.com > <https://groups.google.com/d/msgid/opencog/402a7064-035e-4cb6-85eb-484a058feac9%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- cassette tapes - analog TV - film cameras - you -- You received this message because you are subscribed to the Google Groups "opencog" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/opencog/CAHrUA36xsvWtUt4AkqXi0fwJj9WFqpGebGg4Ra7xe09xJCP42w%40mail.gmail.com.
