What about the ZMQ socket on the msgd process, can you see the messages there? 
Given that I cannot find the error_channel() definition in Machinekit-HAL, I am 
not sure if the support for it is done in rtapi logging. I have a mounting 
anxiety that it is one of the things which were in LinuxCNC but were superseded 
in Machinekit and now it is a bloody stump. (In other words, something which on 
some nice day somebody will have to solve/repair).

However, still it is odd that C call to rtapi_print_msg you can see and python 
call to RTAPILogger you cannot - when it uses the exact same function - or at 
least it looks like it. As I said, I don't know Python well, but can you 
stop/step into (debug) when the python calls the rtapi_print_msg?

BTW, are you watching with right logging level?

Cern.


Jul 25, 2020, 02:27 by [email protected]:

> I’ll have to dig a little deeper. I’m monitoring the error channel in Python 
> using something like this (this is the only process calling poll on the 
> error_channel):
>
> import linuxcnc 
> e = linuxcnc.error_channel()
>
> while True:
>  error = e.poll()
>  if error:
>  print error
>  sleep(.1)
>
> I don’t see error messages come through when I use a separate Python process 
> to log messages using RTAPILogger, but I do when using rtapi_print_msg in a 
> real time component. I wasn’t aware of the debugging issues, so I’ll take a 
> closer look. Thanks for the info!
>
>
>> On Jul 24, 2020, at 5:03 PM, [email protected] wrote:
>>
>> Hi,
>>
>> Jul 24, 2020, 23:14 by [email protected]:
>>
>>> Unlike rtapi_print_msg, this doesn't seem to append messages to the 
>>> linuxcnc.error_channel. Is there anyway to do so in python?
>>>
>> maybe I don't understand the question (and this python stuff is a little bit 
>> outside my comfort zone), however isn't the RTAPILogger implemented as a 
>> Cython wrapper of rtapi_print_msg? (In src/hal/cython/machinekit/rtapi.pyx.) 
>> And as such it should have the same output.
>>
>> Of course like many things in Machinekit, the logging project was started, 
>> implemented to a functioning state but then unfortunately left without much 
>> support and bugfixing, so there are problems. For example 
>> https://github.com/machinekit/machinekit-hal/issues/199
>>
>> Cern.
>>
>>>> On Thursday, July 16, 2015 at 12:19:57 AM UTC-6 [email protected] 
>>>> wrote:
>>>>
>>>>
>>>> Yishin Li writes: 
>>>>
>>>>> Hi Michael, 
>>>>>
>>>>> On Thursday, July 16, 2015 at 12:17:06 AM UTC+8, Michael Haberler wrote: 
>>>>>
>>>>>>
>>>>>>
>>>>>> HOWEVER it does not log in sequence with the other events in HAL/RTAPI 
>>>>>> and 
>>>>>> that can be key for determining causality 
>>>>>>
>>>>>> that is the primary reason for the unified logging architecture which 
>>>>>> funnels every log message through a message queue regardless of origin 
>>>>>> so 
>>>>>> sequencing is retained - RT, user (remember logging being a mess :-? 
>>>>>> like a 
>>>>>> bit here, a bit there, and a bit in dmesg and _no_ sequencing? ) 
>>>>>>
>>>>>> if you dont care about sequencing for one reason or the other, then the 
>>>>>> Python syslog package is fine 
>>>>>>
>>>>> RTAPILogger works! 
>>>>>
>>>>> Here's the RTAPILogger example: 
>>>>> from machinekit import rtapi 
>>>>> rtapi.init_RTAPI() 
>>>>>
>>>> No need to call init_RTAPI for logging -> it does only initialize 
>>>> RTAPICommand so it 
>>>> can be used from the module e.g. rtapi.loadrt('blbla') 
>>>>
>>>>> log = rtapi.RTAPILogger(level=rtapi.MSG_ERR,tag="marker") 
>>>>> print >> log, "some message" 
>>>>> Here's the /var/log/linuxcnc.log: 
>>>>> Jul 16 10:34:17 interlaken msgd:0: marker:10350:user some message 
>>>>>
>>>>> Awesome! 
>>>>>
>>>>> Thank you very much, 
>>>>>
>>>>> -Yishin
>>>>>
>>>>
>>>> -- 
>>>> Alexander 
>>>>
>>>
>>>
>>>
>>> --
>>> website: > http://www.machinekit.io>  blog: > http://blog.machinekit.io>  
>>> github: > https://github.com/machinekit
>>> --- 
>>> You received this message because you are subscribed to the Google Groups 
>>> "Machinekit" 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/machinekit/d3244a63-a003-4fa3-9ec0-2c44f1a0543an%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/machinekit/d3244a63-a003-4fa3-9ec0-2c44f1a0543an%40googlegroups.com?utm_medium=email&utm_source=footer>>
>>>  .
>>>
>
> -- 
> website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
> https://github.com/machinekit
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Machinekit" 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/machinekit/EC8705B1-4EE5-4F9E-896A-48C4446AB8A5%40pocketnc.com.
>

-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" 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/machinekit/MD2Scxw--3-2%40tuta.io.

Reply via email to