def format
      raise FormatError.new(self) unless formattable?

      REXML::Document.new.tap do |doc|
        doc << REXML::XMLDecl.new
        doc.elements << @log.format
      end
    end
def format
      raise FormatError.new(self) unless formattable?

      REXML::Document.new.tap do |doc|
        doc << REXML::XMLDecl.new
        doc.elements << @log.format
      end
    end
Format as a XML document.

 @return [REXML::Document]
   XML document
 @raise FormatError
   format error when the document is not formattable