From mboxrd@z Thu Jan 1 00:00:00 1970 From: mathieu.desnoyers@efficios.com (Mathieu Desnoyers) Date: Tue, 9 Jun 2015 14:42:40 +0000 (UTC) Subject: [lttng-dev] LTTng-UST new tracelog() feature Message-ID: <2128314805.7287.1433860960349.JavaMail.zimbra@efficios.com> 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 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