event-rule: set event rule loglevel to domain specific value when unset
[lttng-tools.git] / src / common / event-rule / python-logging.cpp
index 2f2187267615cc24c4a2a97da0a823b2b6753cf7..9fcfaba9c66aad722c7aa8b3c23470c6c651e847 100644 (file)
@@ -145,12 +145,12 @@ static bool lttng_event_rule_python_logging_is_equal(const struct lttng_event_ru
        /* Long check. */
        LTTNG_ASSERT(a->pattern);
        LTTNG_ASSERT(b->pattern);
-       if (strcmp(a->pattern, b->pattern)) {
+       if (strcmp(a->pattern, b->pattern) != 0) {
                goto end;
        }
 
        if (a->filter_expression && b->filter_expression) {
-               if (strcmp(a->filter_expression, b->filter_expression)) {
+               if (strcmp(a->filter_expression, b->filter_expression) != 0) {
                        goto end;
                }
        } else if (!!a->filter_expression != !!b->filter_expression) {
@@ -413,7 +413,7 @@ lttng_event_rule_python_logging_generate_lttng_event(const struct lttng_event_ru
        status = lttng_event_rule_python_logging_get_log_level_rule(rule, &log_level_rule);
        if (status == LTTNG_EVENT_RULE_STATUS_UNSET) {
                loglevel_type = LTTNG_EVENT_LOGLEVEL_ALL;
-               loglevel_value = 0;
+               loglevel_value = LTTNG_LOGLEVEL_PYTHON_NOTSET;
        } else if (status == LTTNG_EVENT_RULE_STATUS_OK) {
                enum lttng_log_level_rule_status llr_status;
 
This page took 0.024147 seconds and 4 git commands to generate.