summaryrefslogtreecommitdiff
path: root/src/configuration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/configuration.cpp')
-rw-r--r--src/configuration.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/configuration.cpp b/src/configuration.cpp
index 53f6785e..8bb0b8ca 100644
--- a/src/configuration.cpp
+++ b/src/configuration.cpp
@@ -79,6 +79,8 @@ void Configuration::write()
// Do not attempt to write to file that cannot be opened for writing
FILE *testFile = fopen(mConfigPath.c_str(), "w");
if (!testFile) {
+ logger->log("Configuration::write() couldn't open %s for writing",
+ mConfigPath.c_str());
return;
}
else {
@@ -87,8 +89,12 @@ void Configuration::write()
xmlTextWriterPtr writer = xmlNewTextWriterFilename(mConfigPath.c_str(), 0);
- if (!writer)
+ if (!writer) {
+ logger->log("Configuration::write() error while creating writer");
return;
+ }
+
+ logger->log("Configuration::write() writing configuration...");
xmlTextWriterSetIndent(writer, 1);
xmlTextWriterStartDocument(writer, NULL, NULL, NULL);
@@ -96,9 +102,6 @@ void Configuration::write()
for (OptionIterator i = mOptions.begin(); i != mOptions.end(); i++)
{
- logger->log("Configuration::write(%s, \"%s\")",
- i->first.c_str(), i->second.c_str());
-
xmlTextWriterStartElement(writer, BAD_CAST "option");
xmlTextWriterWriteAttribute(writer,
BAD_CAST "name", BAD_CAST i->first.c_str());