Sha256: c33336b2d674b3756664d28add13a9cce00192f9a9450f261b0550fa0335db4f
Contents?: true
Size: 664 Bytes
Versions: 27
Compression:
Stored size: 664 Bytes
Contents
require 'logger' require 'fileutils' module Soaspec # Handles logs of API requests and responses class SpecLogger class << self def create unless File.exist?('logs/traffic.log') FileUtils.mkdir_p 'logs' FileUtils.touch File.join('logs', 'traffic.log') end @logger = Logger.new('logs/traffic.log') # Where request and responses of APIs are stored @logger.level = Logger::DEBUG @logger end # Log a message using Soaspec logger # @param [String] message The message to add to the logger def add_to(message) @logger.info(message) end end end end
Version data entries
27 entries across 27 versions & 1 rubygems