Sha256: e1f4e982dfe2cafe93f579155ad2623813b56f30c2476cb95d45d924a71854de
Contents?: true
Size: 318 Bytes
Versions: 13
Compression:
Stored size: 318 Bytes
Contents
class ResponseLogger def object_log(code=nil, body) body = JSON.parse body log = File.open "#{LOG}", 'a+' log.write "call @ #{timestamp}" log.write "HTTP #{code}\n" unless code==nil log.write JSON.pretty_generate body log.write "\n" log.close end def timestamp `date` end end
Version data entries
13 entries across 13 versions & 1 rubygems