This requires an enable after qb_log_file_open()
Signed-off-by: Angus Salkeld <asalkeld(a)redhat.com>
---
lib/log_file.c | 1 -
tests/simple-log.c | 1 +
2 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/log_file.c b/lib/log_file.c
index 12c4327..9ba8a6d 100644
--- a/lib/log_file.c
+++ b/lib/log_file.c
@@ -85,7 +85,6 @@ int32_t qb_log_file_open(const char *filename)
t->logger = _file_logger;
t->reload = _file_reload;
t->close = _file_close;
- t->state = QB_LOG_STATE_ENABLED;
return t->pos;
}
diff --git a/tests/simple-log.c b/tests/simple-log.c
index e507e0f..898a9c1 100644
--- a/tests/simple-log.c
+++ b/tests/simple-log.c
@@ -163,6 +163,7 @@ int32_t main(int32_t argc, char *argv[])
QB_LOG_FILTER_FILE, __FILE__, priority);
qb_log_format_set(log_fd, "%t %n() [%p] %b");
qb_log_ctl(log_fd, QB_LOG_CONF_THREADED, do_threaded);
+ qb_log_ctl(log_fd, QB_LOG_CONF_ENABLED, QB_TRUE);
}
if (do_threaded) {
qb_log_thread_start();
--
1.7.4