Unlike rtapi_print_msg, this doesn't seem to append messages to the 
linuxcnc.error_channel. Is there anyway to do so in python?

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.

Reply via email to