Logging: pass dynamic log level to common functions and subsystems
[babeltrace.git] / src / fd-cache / fd-cache.c
index cb1472b9a84347ebfcffec000dddd7b0c8f772d0..9a742a4515028a554969ba7aec04d9b0ae2cdb10 100644 (file)
@@ -26,8 +26,9 @@
  * SOFTWARE.
  */
 
+#define BT_LOG_OUTPUT_LEVEL (fdc->log_level)
 #define BT_LOG_TAG "FD-CACHE"
-#include "logging.h"
+#include "logging/log.h"
 
 #include <fcntl.h>
 #include <sys/stat.h>
@@ -102,10 +103,11 @@ void file_key_destroy(gpointer data)
 }
 
 BT_HIDDEN
-int bt_fd_cache_init(struct bt_fd_cache *fdc)
+int bt_fd_cache_init(struct bt_fd_cache *fdc, int log_level)
 {
        int ret = 0;
 
+       fdc->log_level = log_level;
        fdc->cache = g_hash_table_new_full(file_key_hash, file_key_equal,
                file_key_destroy, (GDestroyNotify) fd_cache_handle_internal_destroy);
        if (!fdc->cache) {
This page took 0.023818 seconds and 4 git commands to generate.