asalkeld/libqb — Issue #28: qb_log_from_external_source incorrectly caches log level
Author: beekhof
Created: 2012-01-24 11:18:22+00:00
State: open

for(level = LOG_ERR; level < LOG_DEBUG; level++) {
qb_log_from_external_source( __func__, __FILE__, "I'm logging this at level %d", level, __LINE__, 0, level);
}

results in:

error: main:	I'm logging this at level 3
error: main:	I'm logging this at level 4
error: main:	I'm logging this at level 5
error: main:	I'm logging this at level 6

Looping the other way (level = LOG_TRACE) would result in nothing being printed unless tracing was enabled.