Code

plugin: Log to stderr if no logger has been registered.
[sysdb.git] / src / core / plugin.c
index 7584aa54d273bf0fce16ad7dd81f593a4e3ac7f0..188c7db1515859739efff2c456bd00c62f893f98 100644 (file)
@@ -959,7 +959,7 @@ sdb_plugin_log(int prio, const char *msg)
        if (! msg)
                return 0;
 
-       if (! log_list)
+       if (! sdb_llist_len(log_list))
                return fprintf(stderr, "[%s] %s\n", SDB_LOG_PRIO_TO_STRING(prio), msg);
 
        iter = sdb_llist_get_iter(log_list);