Sha256: 7782a8abbb6cc08b8622560336de5cb53e17f5a0e852abd0a2abdea4c59787eb
Contents?: true
Size: 430 Bytes
Versions: 4
Compression:
Stored size: 430 Bytes
Contents
class ResponseLogger def object_log(function, code, body) log = File.open "#{LOG}", 'a+' log.write "call @ #{timestamp}" log.write "HTTP #{code}\n" log.write body log.write "\n" log.close end def string_log(function, response) log = File.open "#{LOG}", 'a+' log.write "call @ #{timestamp}" log.write response log.write "\n" log.close end def timestamp `date` end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
apidragon-1.2.0 | lib/apidragon/log.rb |
apidragon-1.1.2 | lib/apidragon/log.rb |
apidragon-1.1.1 | lib/apidragon/log.rb |
apidragon-1.1.0 | lib/apidragon/log.rb |