Sha256: 10890aa5e278b18745fde03b2ee36e23f3696ac121d1c55e84d87c3dbebfedf7

Contents?: true

Size: 356 Bytes

Versions: 1

Compression:

Stored size: 356 Bytes

Contents

require 'structured_log'

text = <<EOT

Method put_cdata puts the data verbatim:

* Nothing is added or subtracted.
* Not even whitespace.

So you can use the method to log a formatted string.

(You'll need to add your own leading and trailing newlines, if desired.)

EOT
StructuredLog.open('cdata.xml') do |log|
  log.put_cdata(text)
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
structured_log-0.9.0 readme_files/scripts/cdata.rb