From: Mukund Sivaraman Date: Wed, 17 Jul 2013 13:00:20 +0000 (+0530) Subject: [2856] Log errors when using the ZoneWriter X-Git-Tag: bind10-1.2.0beta1-release~306^2~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cd9d3e1a07cba7cabf1118ffec7f7dacebc0ecfe;p=thirdparty%2Fkea.git [2856] Log errors when using the ZoneWriter --- diff --git a/src/lib/python/isc/memmgr/builder.py b/src/lib/python/isc/memmgr/builder.py index b5375aad7b..0b2700637e 100644 --- a/src/lib/python/isc/memmgr/builder.py +++ b/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() diff --git a/src/lib/python/isc/memmgr/memmgr_messages.mes b/src/lib/python/isc/memmgr/memmgr_messages.mes index 23add5234d..3625b019fe 100644 --- a/src/lib/python/isc/memmgr/memmgr_messages.mes +++ b/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.