/*
Copyright 2015 IoT.bzh
+ author: José Bollo <jose.bollo@iot.bzh>
+
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
#include <unistd.h>
#include <string.h>
-#include <syslog.h>
#include <assert.h>
#include <errno.h>
#include <libxml/tree.h>
#include <libxml/uri.h>
+#include "verbose.h"
#include "wgt.h"
#include "wgt-config.h"
assert(!configxml);
fd = wgt_open_read(wgt, wgt_config_string_xml_file);
if (fd < 0) {
- syslog(LOG_ERR, "can't open config file %s", wgt_config_string_xml_file);
+ ERROR("can't open config file %s", wgt_config_string_xml_file);
return fd;
}
configxml = xmlReadFd(fd, wgt_config_string_xml_file, NULL, 0);
close(fd);
if (configxml == NULL) {
- syslog(LOG_ERR, "xml parse of config file %s failed", wgt_config_string_xml_file);
+ ERROR("xml parse of config file %s failed", wgt_config_string_xml_file);
return -1;
}
assert(xmlDocGetRootElement(configxml));