Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
* [lttng-dev] LTTng-UST new tracelog() feature
@ 2015-06-09 14:42 Mathieu Desnoyers
  0 siblings, 0 replies; only message in thread
From: Mathieu Desnoyers @ 2015-06-09 14:42 UTC (permalink / raw)


Hi,

I just pushed a new instrumentation feature into lttng-ust
targeting applications that want to move their existing logging
facilities to LTTng-UST. From the updated lttng-ust(3) manpage:

USAGE WITH TRACELOG
       If you want to migrate existing logging (info, errors, ...)   to  LTTng
       UST, you can use the tracelog() interface.  To do it, in a nutshell:

       1) #include <lttng/tracelog.h>

       2) /* in your code, use like a printf, with extra loglevel info. */
          tracelog(TRACE_INFO, "Message with integer %d", 1234);

       3) Link your program against liblttng-ust.so.

       4)  Enable  UST events when tracing with the following sequence of com?
       mands
          from lttng-tools:

          lttng create
          lttng enable-event -u "lttng_ust_tracelog:*"
          lttng start
          [... run your program ...]
          lttng stop
          lttng view

       That's it!

       You can replace  the  enable-event  line  above  with  a  selection  of
       loglevels, e.g.:

          lttng enable-event -u -a --loglevel TRACE_INFO

       Which  will  gather  all  events  from  TRACE_INFO  and  more important
       loglevels.

Feedback is welcome!

Thanks,

Mathieu

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-06-09 14:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-09 14:42 [lttng-dev] LTTng-UST new tracelog() feature Mathieu Desnoyers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox