Browse Source

[2421] Include zone name in log messages

Mukund Sivaraman 12 years ago
parent
commit
b37e972c6c
2 changed files with 4 additions and 4 deletions
  1. 2 2
      src/lib/datasrc/client_list.cc
  2. 2 2
      src/lib/datasrc/datasrc_messages.mes

+ 2 - 2
src/lib/datasrc/client_list.cc

@@ -180,7 +180,7 @@ ConfigurableClientList::configure(const ConstElementPtr& config,
                                         paramConf->get(*it)->stringValue());
                                         paramConf->get(*it)->stringValue());
                         } catch (const ZoneLoaderException& e) {
                         } catch (const ZoneLoaderException& e) {
                             LOG_ERROR(logger, DATASRC_LOAD_FROM_FILE_ERROR)
                             LOG_ERROR(logger, DATASRC_LOAD_FROM_FILE_ERROR)
-                                .arg(e.what());
+                                .arg(origin).arg(e.what());
                         }
                         }
                     } else {
                     } else {
                         ZoneIteratorPtr iterator;
                         ZoneIteratorPtr iterator;
@@ -199,7 +199,7 @@ ConfigurableClientList::configure(const ConstElementPtr& config,
                             cache->load(origin, *iterator);
                             cache->load(origin, *iterator);
                         } catch (const ZoneLoaderException& e) {
                         } catch (const ZoneLoaderException& e) {
                             LOG_ERROR(logger, DATASRC_LOAD_FROM_ITERATOR_ERROR)
                             LOG_ERROR(logger, DATASRC_LOAD_FROM_ITERATOR_ERROR)
-                                .arg(e.what());
+                                .arg(origin).arg(e.what());
                         }
                         }
                     }
                     }
                 }
                 }

+ 2 - 2
src/lib/datasrc/datasrc_messages.mes

@@ -305,12 +305,12 @@ Therefore, the zone will not be available for this process. If this is
 a problem, you should move the zone to some database backend (sqlite3, for
 a problem, you should move the zone to some database backend (sqlite3, for
 example) and use it from there.
 example) and use it from there.
 
 
-% DATASRC_LOAD_FROM_FILE_ERROR %1
+% DATASRC_LOAD_FROM_FILE_ERROR Error loading zone %1: %2
 An error was found in the zone data when it was being loaded from a
 An error was found in the zone data when it was being loaded from a
 file. The zone was not loaded. The specific error is shown in the
 file. The zone was not loaded. The specific error is shown in the
 message, and should be addressed.
 message, and should be addressed.
 
 
-% DATASRC_LOAD_FROM_ITERATOR_ERROR %1
+% DATASRC_LOAD_FROM_ITERATOR_ERROR Error loading zone %1: %2
 An error was found in the zone data when it was being loaded from
 An error was found in the zone data when it was being loaded from
 another data source. The zone was not loaded. The specific error is
 another data source. The zone was not loaded. The specific error is
 shown in the message, and should be addressed.
 shown in the message, and should be addressed.