Sha256: affd8395e4df5531e0451341bb2d47262a7632fa3ee27bffce9b62e78b58c4c1
Contents?: true
Size: 497 Bytes
Versions: 29
Compression:
Stored size: 497 Bytes
Contents
require 'logger' require 'fileutils' module Soaspec # Handles logs of API requests and responses class SpecLogger def self.create unless File.exist?('logs/traffic.log') FileUtils.mkdir_p 'logs' FileUtils.touch 'traffic.log' end @logger = Logger.new('logs/traffic.log') # Where request and responses of APIs are stored @logger.level = Logger::DEBUG @logger end def self.add_to(message) @logger.info(message) end end end
Version data entries
29 entries across 29 versions & 1 rubygems