Browse Source

[2856] Log errors when using the ZoneWriter

Mukund Sivaraman 12 years ago
parent
commit
cd9d3e1a07

+ 4 - 4
src/lib/python/isc/memmgr/builder.py

@@ -110,16 +110,16 @@ class MemorySegmentBuilder:
             result, writer = clist.get_cached_zone_writer(zone_name, catch_load_error,
                                                           dsrc_name)
             if result != ConfigurableClientList.CACHE_STATUS_ZONE_SUCCESS:
-                # FIXME: log the error
+                logger.error(MEMMGR_BUILDER_GET_ZONE_WRITER_ERROR, zone_name, dsrc_name)
                 continue
 
             try:
                 error = writer.load()
                 if error is not None:
-                    # FIXME: log the error
+                    logger.error(MEMMGR_BUILDER_ZONE_WRITER_LOAD_1_ERROR, zone_name, dsrc_name, error)
                     continue
-            except Exception:
-                # FIXME: log it
+            except Exception as e:
+                logger.error(MEMMGR_BUILDER_ZONE_WRITER_LOAD_2_ERROR, zone_name, dsrc_name, str(e))
                 continue
             writer.install()
             writer.cleanup()

+ 14 - 0
src/lib/python/isc/memmgr/memmgr_messages.mes

@@ -19,3 +19,17 @@
 The MemorySegmentBuilder has received a bad command in its input command
 queue. This is likely a programming error. If the builder runs in a
 separate thread, this would cause it to exit the thread.
+
+% MEMMGR_BUILDER_GET_ZONE_WRITER_ERROR Unable to get zone writer for zone '%1', data source '%2'. Skipping.
+The MemorySegmentBuilder was unable to get a ZoneWriter for the
+specified zone when handling the load command. This zone will be
+skipped.
+
+% MEMMGR_BUILDER_ZONE_WRITER_LOAD_1_ERROR Error loading zone '%1', data source '%2': '%3'
+The MemorySegmentBuilder failed to load the specified zone when handling
+the load command. This zone will be skipped.
+
+% MEMMGR_BUILDER_ZONE_WRITER_LOAD_2_ERROR Error loading zone '%1', data source '%2': '%3'
+An exception occured when the MemorySegmentBuilder tried to load the
+specified zone when handling the load command. This zone will be
+skipped.