Saving the log level of events in session configurations when "ALL" log
levels are enabled may confuse both users and programs working with
session configurations.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
goto end;
}
- ret = config_writer_write_element_signed_int(writer,
- config_element_loglevel, event->attr.loglevel);
- if (ret) {
- ret = LTTNG_ERR_SAVE_IO_FAIL;
- goto end;
+ /* The log level is irrelevant if no "filtering" is enabled */
+ if (event->attr.loglevel_type != LTTNG_UST_LOGLEVEL_ALL) {
+ ret = config_writer_write_element_signed_int(writer,
+ config_element_loglevel, event->attr.loglevel);
+ if (ret) {
+ ret = LTTNG_ERR_SAVE_IO_FAIL;
+ goto end;
+ }
}
if (event->filter_expression) {