They will be printed as trace, it's mainly to make
filtering more flexible
Signed-off-by: Angus Salkeld <asalkeld(a)redhat.com>
---
lib/log.c | 1 -
tests/check_log.c | 3 ---
tests/simple-log.c | 3 ++-
3 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/lib/log.c b/lib/log.c
index dfaea9b..13996b4 100644
--- a/lib/log.c
+++ b/lib/log.c
@@ -552,7 +552,6 @@ qb_log_filter_ctl2(int32_t t, enum qb_log_filter_conf c,
return -EBADF;
}
if (text == NULL ||
- low_priority > LOG_TRACE ||
low_priority < high_priority ||
type > QB_LOG_FILTER_FORMAT ||
c > QB_LOG_TAG_CLEAR_ALL) {
diff --git a/tests/check_log.c b/tests/check_log.c
index c7bd678..b9efd03 100644
--- a/tests/check_log.c
+++ b/tests/check_log.c
@@ -121,9 +121,6 @@ START_TEST(test_log_stupid_inputs)
/* crap values to filter_ctl() */
rc = qb_log_filter_ctl(QB_LOG_SYSLOG, QB_LOG_FILTER_ADD,
- QB_LOG_FILTER_FILE, "bla", 45);
- ck_assert_int_eq(rc, -EINVAL);
- rc = qb_log_filter_ctl(QB_LOG_SYSLOG, QB_LOG_FILTER_ADD,
QB_LOG_FILTER_FILE, NULL, LOG_INFO);
ck_assert_int_eq(rc, -EINVAL);
rc = qb_log_filter_ctl(QB_LOG_SYSLOG, 56,
diff --git a/tests/simple-log.c b/tests/simple-log.c
index 37a5475..ef57503 100644
--- a/tests/simple-log.c
+++ b/tests/simple-log.c
@@ -36,6 +36,7 @@ static void func_one(void)
qb_enter();
qb_logt(LOG_DEBUG, MY_TAG_TWO, "arf arf?");
qb_logt(LOG_CRIT, MY_TAG_THREE, "arrrg!");
+ qb_logt(134, MY_TAG_THREE, "big priority");
qb_logt(LOG_ERR, MY_TAG_THREE, "oops, I did it again");
qb_log(LOG_INFO, "are you aware ...");
@@ -176,7 +177,7 @@ int32_t main(int32_t argc, char *argv[])
qb_log_format_set(tracer, "%4g: %n() %b");
qb_log_filter_ctl2(tracer, QB_LOG_FILTER_ADD,
QB_LOG_FILTER_FILE, __FILE__,
- LOG_TRACE, LOG_TRACE);
+ LOG_TRACE, 200);
}
if (do_blackbox) {
qb_log_filter_ctl(QB_LOG_BLACKBOX, QB_LOG_FILTER_ADD,
--
1.7.6