- enable-event "$event_name" $chan -s $sess_name -l
- ok $? "Enable LOG4J event $event_name for session $sess_name"
+ enable-event "$event_name" "${chan_opt[@]}" -s "$sess_name" --log4j
+ ok $? "Enable LOG4J event '$event_name' for session '$sess_name'"
+}
+
+function enable_log4j_lttng_event_filter()
+{
+ local sess_name=$1
+ local event_name=$2
+ local filter=$3
+
+ _run_lttng_cmd "$OUTPUT_DEST" "$ERROR_OUTPUT_DEST" \
+ enable-event "$event_name" -s "$sess_name" --log4j --filter "$filter"
+ ok $? "Enable LOG4J event '$event_name' with filter '$filter' for session '$sess_name'"
+}
+
+function enable_log4j_lttng_event_filter_loglevel_only()
+{
+ local sess_name=$1
+ local event_name=$2
+ local filter=$3
+ local loglevel=$4
+
+ _run_lttng_cmd "$OUTPUT_DEST" "$ERROR_OUTPUT_DEST" \
+ enable-event --loglevel-only "$loglevel" "$event_name" -s "$sess_name" -l --filter "$filter"
+ ok $? "Enable LOG4J event '$event_name' with filter '$filter' and loglevel-only '$loglevel' for session '$sess_name'"