Sha256: ce36b21b70271e580bc7b31158f93419874e825669750954a62390867c3fcf7d

Contents?: true

Size: 475 Bytes

Versions: 1

Compression:

Stored size: 475 Bytes

Contents

require 'structured_log'

float = 3.14159
boolean = false
fixnum = 1066
time = Time.new
exception = RuntimeError.new('Oops!')

StructuredLog.open('potpourri_other.xml') do |log|
  log.section('Others', 'Other values are logged as the string returned by value.inspect.')do
    [float, boolean, fixnum, time, exception].each do |value|
      element_name = "Log instance of #{value.class}"
      log.section(element_name, value) do
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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