extern const char * const config_element_loglevel;
extern const char * const config_element_loglevel_type;
extern const char * const config_element_filter;
+extern const char * const config_element_filter_expression;
extern const char * const config_element_snapshot_outputs;
extern const char * const config_element_consumer_output;
extern const char * const config_element_destination;
const char * const config_element_loglevel = "loglevel";
const char * const config_element_loglevel_type = "loglevel_type";
const char * const config_element_filter = "filter";
+const char * const config_element_filter_expression = "filter_expression";
const char * const config_element_snapshot_outputs = "snapshot_outputs";
const char * const config_element_consumer_output = "consumer_output";
const char * const config_element_destination = "destination";
struct lttng_event *event)
{
int ret;
+ const char *filter_expression;
/* Open event element */
ret = mi_lttng_writer_open_element(writer, config_element_event);
ret = mi_lttng_writer_write_element_bool(writer,
config_element_filter, event->filter);
+ /* Event filter expression */
+ ret = lttng_event_get_filter_string(event, &filter_expression);
+
+ if (ret) {
+ goto end;
+ }
+
+ if (filter_expression) {
+ ret = mi_lttng_writer_write_element_string(writer,
+ config_element_filter_expression,
+ filter_expression);
+
+ if (ret) {
+ goto end;
+ }
+ }
+
end:
return ret;
}
<xs:element name="loglevel" type="loglevel_string_type" default="" minOccurs="0" />
<xs:element name="enabled" type="xs:boolean" default="false" minOccurs="0" />
<xs:element name="filter" type="xs:boolean" minOccurs="0" />
+ <xs:element name="filter_expression" type="xs:string" minOccurs="0" />
<xs:element name="exclusion" type="xs:boolean" minOccurs="0" />
<xs:element name="exclusions" type="event_exclusion_list_type" minOccurs="0"/>
<xs:element name="attributes" type="event_attributes_type" minOccurs="0" />