Code

Use sdb_log() in place of sdb_plugin_log().
authorSebastian Harl <sh@tokkee.org>
Thu, 10 Nov 2016 21:46:57 +0000 (22:46 +0100)
committerSebastian Harl <sh@tokkee.org>
Thu, 10 Nov 2016 21:46:57 +0000 (22:46 +0100)
It's up to the error module to decide how to log. Inside the daemon, both are
basically equivalent.

src/core/plugin.c
src/plugins/cname/dns.c

index 67f9dfea05259610299d5838623b863f820fc87f..e350494979f67c6c69f5183eaa94d02b733b997f 100644 (file)
@@ -1196,7 +1196,7 @@ sdb_plugin_get_ctx(void)
 
        c = ctx_get();
        if (! c) {
 
        c = ctx_get();
        if (! c) {
-               sdb_plugin_log(SDB_LOG_ERR, "core: Invalid read access to plugin "
+               sdb_log(SDB_LOG_ERR, "core: Invalid read access to plugin "
                                "context outside a plugin");
                return plugin_default_ctx;
        }
                                "context outside a plugin");
                return plugin_default_ctx;
        }
@@ -1210,7 +1210,7 @@ sdb_plugin_set_ctx(sdb_plugin_ctx_t ctx, sdb_plugin_ctx_t *old)
 
        c = ctx_get();
        if (! c) {
 
        c = ctx_get();
        if (! c) {
-               sdb_plugin_log(SDB_LOG_ERR, "core: Invalid write access to plugin "
+               sdb_log(SDB_LOG_ERR, "core: Invalid write access to plugin "
                                "context outside a plugin");
                return -1;
        }
                                "context outside a plugin");
                return -1;
        }
index e54ce7cd739de3face3c94ef2023a412146142e4..0b17d963af691519faa260d628004fc08e41b857 100644 (file)
@@ -68,7 +68,7 @@ sdb_dns_cname(const char *name,
        err = getaddrinfo(name, /* service = */ NULL, &hints, &ret);
        if (err) {
                /* XXX: what to do about EAI_AGAIN? */
        err = getaddrinfo(name, /* service = */ NULL, &hints, &ret);
        if (err) {
                /* XXX: what to do about EAI_AGAIN? */
-               sdb_plugin_logf(SDB_LOG_ERR, "cname::dns: Failed to resolve '%s': %s",
+               sdb_log(SDB_LOG_ERR, "cname::dns: Failed to resolve '%s': %s",
                                name, gai_strerror(err));
                return NULL;
        }
                                name, gai_strerror(err));
                return NULL;
        }