From 67ada458affcb91d3294bf03718699445a28bb9b Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Fri, 23 May 2014 10:28:41 -0400 Subject: [PATCH] Fix: default loglevel is DEBUG Include "tracef" events when no explicit loglevel is specified. (for usability) Signed-off-by: Mathieu Desnoyers --- doc/man/lttng-ust.3 | 6 +++--- liblttng-ust/lttng-events.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/man/lttng-ust.3 b/doc/man/lttng-ust.3 index 1d1197f4..c72bd32b 100644 --- a/doc/man/lttng-ust.3 +++ b/doc/man/lttng-ust.3 @@ -29,11 +29,11 @@ tracef() API. To do it, in a nutshell: 3) Link your program against liblttng-ust.so. -4) Enable the UST debug loglevel when tracing with the following - sequence of commands from lttng-tools: +4) Enable UST events when tracing with the following sequence of commands + from lttng-tools: lttng create - lttng enable-event -u -a --loglevel=TRACE_DEBUG + lttng enable-event -u -a lttng start [... run your program ...] lttng stop diff --git a/liblttng-ust/lttng-events.c b/liblttng-ust/lttng-events.c index 0cab2f49..e44628df 100644 --- a/liblttng-ust/lttng-events.c +++ b/liblttng-ust/lttng-events.c @@ -105,19 +105,19 @@ int lttng_loglevel_match(int loglevel, switch (req_type) { case LTTNG_UST_LOGLEVEL_RANGE: if (loglevel <= req_loglevel - || (req_loglevel == -1 && loglevel <= TRACE_DEFAULT)) + || (req_loglevel == -1 && loglevel <= TRACE_DEBUG)) return 1; else return 0; case LTTNG_UST_LOGLEVEL_SINGLE: if (loglevel == req_loglevel - || (req_loglevel == -1 && loglevel <= TRACE_DEFAULT)) + || (req_loglevel == -1 && loglevel <= TRACE_DEBUG)) return 1; else return 0; case LTTNG_UST_LOGLEVEL_ALL: default: - if (loglevel <= TRACE_DEFAULT) + if (loglevel <= TRACE_DEBUG) return 1; else return 0; -- 2.34.1