logfmt-ruby icon indicating copy to clipboard operation
logfmt-ruby copied to clipboard

Parse log lines in the logfmt style.

Logfmt

Parse log lines in the logfmt style:

require "logfmt/parser"

Logfmt::Parser.parse('foo=bar a=14 baz="hello kitty" cool%story=bro f %^asdf')
  #=> {"foo"=>"bar", "a"=>14, "baz"=>"hello kitty", "cool%story"=>"bro", "f"=>true, "%^asdf"=>true}