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/MD23CoJ--3-2%40tuta.io.

Reply via email to