summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2018-01-18 11:47:47 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2018-01-18 14:39:37 +0100
commitbb4c5ebddf1c470d5808d38699b7e6785015a696 (patch)
tree0fcc45d206d96595e2b477f0c51ee819f0b0ba10
parent5ec8547add3edcfd3ea8da946b3783c66aee86df (diff)
lib/core: Don't hide non-debug message when filtering for a debug log domain
I think this is the more sensible semantics, since this allows you to still follow what's going on with the test at a high level, while filtering for a specific (or multiple specific) debug log domains. For non-debug messages log-domains technically exist, but we're not making much use of them really. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--lib/igt_core.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/igt_core.c b/lib/igt_core.c
index 8e7f0da8..aaafc1df 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -291,7 +291,7 @@ enum {
static int igt_exitcode = IGT_EXIT_SUCCESS;
static const char *command_str;
-static char* igt_log_domain_filter;
+static char* igt_debug_log_domain_filter;
static struct {
char *entries[256];
uint8_t start, end;
@@ -757,7 +757,7 @@ static int common_init(int *argc, char **argv,
case OPT_DEBUG:
igt_log_level = IGT_LOG_DEBUG;
if (optarg && strlen(optarg) > 0)
- igt_log_domain_filter = strdup(optarg);
+ igt_debug_log_domain_filter = strdup(optarg);
break;
case OPT_LIST_SUBTESTS:
if (!run_single_subtest)
@@ -2104,12 +2104,12 @@ void igt_vlog(const char *domain, enum igt_log_level level, const char *format,
goto out;
/* check domain filter */
- if (igt_log_domain_filter) {
+ if (level == IGT_LOG_DEBUG && igt_debug_log_domain_filter) {
/* if null domain and filter is not "application", return */
- if (!domain && strcmp(igt_log_domain_filter, "application"))
+ if (!domain && strcmp(igt_debug_log_domain_filter, "application"))
goto out;
/* else if domain and filter do not match, return */
- else if (domain && strcmp(igt_log_domain_filter, domain))
+ else if (domain && strcmp(igt_debug_log_domain_filter, domain))
goto out;
}