From: Jérémie Galarneau Date: Thu, 28 Aug 2014 16:53:43 +0000 (-0400) Subject: Fix: Parenthesize previous statement when adding conditions to a filter X-Git-Tag: v2.6.0-rc1~71 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=fb0edb23588244609bc2e7552e8c3a07af13f540;hp=fb0edb23588244609bc2e7552e8c3a07af13f540;ds=sidebyside Fix: Parenthesize previous statement when adding conditions to a filter Not parenthesizing the clauses in a filter string causes JUL events to be traced even though they are not enabled when an enable-event command is issued with a filter and the --loglevel-only option. For instance, lttng enable-event -j "my_event" --loglevel-only JUL_CONFIG -f "int_loglevel > 0 || int_loglevel < 0" results in the following filter being applied: int_loglevel > 0 || int_loglevel < 0 && logger_name == "my_event" && int_loglevel == 700 The resulting expression will always evaluate to true, regardless of the logger name. This fix parenthesizes each clause to ensure they are all independently evaluated and not unintuitively affected by operator precedence. Signed-off-by: Jérémie Galarneau Signed-off-by: David Goulet ---