Sha256: 97d307901be10a214005c6c139a2b63a2ca0a1968eddcadfbe24e69fbbbc0eb2
Contents?: true
Size: 838 Bytes
Versions: 2
Compression:
Stored size: 838 Bytes
Contents
# # To run this example, just do # # ruby log-trace-example.rb # # You should see a file "debug.log" in your current directory. # begin require 'rubygems' rescue LoadError end require 'dev-utils/debug' require 'extensions/enumerable' # dev-utils depends on extensions anyway. debug "Running sanity check of dev-utils/debug logging and tracing." x, y = 5, 10 trace 'x + y' trace 'Process.pid' debug "Now we test the various output formatters." words = %w(wren fibonnaci smelt bovine smeglicious craptacular inoccidental myrmidon boondoggle) word_lengths = words.build_hash { |word| [word, word.length] } [:p, :s, :pp, :y].each_with_index do |symbol, idx| debug '' debug "#{idx+1}. #{symbol.inspect} format" trace 'words', symbol debug '' trace 'word_lengths', symbol end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
dev-utils-1.0 | examples/log-trace-example.rb |
dev-utils-1.0.1 | examples/log-trace-example.rb |