From: mathieu.desnoyers@efficios.com (Mathieu Desnoyers)
Subject: [lttng-dev] LTTng-UST new tracelog() feature
Date: Tue, 9 Jun 2015 14:42:40 +0000 (UTC) [thread overview]
Message-ID: <2128314805.7287.1433860960349.JavaMail.zimbra@efficios.com> (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
reply other threads:[~2015-06-09 14:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2128314805.7287.1433860960349.JavaMail.zimbra@efficios.com \
--to=mathieu.desnoyers@efficios.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox