code: def save_log_to_html(self):
          
          html = html_header()
          html += (
              '<img src="file:///%s/img/logos/inasafe-logo-url.png" '
              'title="InaSAFE Logo" alt="InaSAFE Logo" />' % resources_path())
          html += ('<h5 class="info"><i class="icon-info-sign icon-white"></i> '
                   '%s</h5>' % self.tr('Analysis log'))
          for item in self.dynamic_messages_log:
              html += "%s\n" % item.to_html()
          html += html_footer()
          if self.log_path is not None:
              html_to_file(html, self.log_path)
          else:
              msg = self.tr('log_path is not set')
              raise InvalidParameterError(msg)
docs: Helper to write the log out as an html file.