Code

Automatically prefix all log messages with the plugin name (if available).
[sysdb.git] / src / plugins / backend / facter.cc
index 98f7f57f18b30c23f0c56e889aa4e924900fcf75..9b325978df43dff5b4896069eafcd5488267f68e 100644 (file)
@@ -57,7 +57,7 @@ fact_iter(std::string const &k, facter::facts::value const *v)
                return true;
 
        sdb_data_t value = { SDB_TYPE_STRING, { .string = str } };
-       sdb_store_attribute(hostname, k.c_str(), &value, now);
+       sdb_plugin_store_attribute(hostname, k.c_str(), &value, now);
        return true;
 } /* fact_iter */
 
@@ -83,10 +83,10 @@ extern "C" {
                std::string s = ss.str();
                hostname = s.c_str();
 
-               sdb_store_host(hostname, now);
+               sdb_plugin_store_host(hostname, now);
                facts.each(fact_iter);
-               sdb_log(SDB_LOG_DEBUG, "facter backend: Processed %zu facts "
-                               "for host '%s'", facts.size(), hostname);
+               sdb_log(SDB_LOG_DEBUG, "Processed %zu facts for host '%s'",
+                               facts.size(), hostname);
                return 0;
        } /* main */