Sha256: b6780a92f491caffb345988e7ce642d2c89508d00e4543c3587c4f3116f8455d

Contents?: true

Size: 435 Bytes

Versions: 1

Compression:

Stored size: 435 Bytes

Contents

require 'structured_log'

StructuredLog.open('time.xml') do |log|
  log.section('Section with timestamp', :timestamp) do
    log.comment('This section has a timestamp.')
  end
  log.section('Section with duration', :duration) do
    log.comment('This section has a duration.')
    sleep 1
  end
  log.section('Section with both', :duration, :timestamp) do
    log.comment('This section has both.')
    sleep 1
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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