jimweirich / builder

Provide a simple way to create XML markup and data structures.
http://builder.rubyforge.org
MIT License
361 stars 103 forks source link

why generating a xml, fills my logs with `- - "new"` message ? #58

Closed grfx1985 closed 7 years ago

grfx1985 commented 7 years ago

part of my service dose this :

products = Product.search(JSON.parse(@campaign.q))
xml = Builder::XmlMarkup.new
xml << @campaign.wrapper_begin
products.each do |product|
      @campaign.root_elements.each do |element|
        xml.tag!(element.tag, element.xml_attributes(product)) do
          element.decorators.each do |decorator|
            element.cdata ? xml.cdata!(decorator.print_code(product).to_s) : xml << decorator.print_code(product).to_s
          end

          element.childs.each do |child|
            xml.tag!(child.tag, child.xml_attributes(product)) do
              child.decorators.each do |decorator|
                child.cdata ? xml.cdata!(decorator.print_code(product).to_s) : xml << decorator.print_code(product).to_s
              end
            end
          end
        end
      end
    end
    xml << @campaign.wrapper_end

image

how is this keep loging ? is there a way to disable this - my logs are humongous because of this :)

image-2017-09-04-12-01-42-044

grfx1985 commented 7 years ago

I have found the reason for this odd behaviour. Sorry to bother You :)